home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 May: Tool Chest / Dev.CD May 00 TC.toast / pc / tool chest / macapp / macapp r14d5 / install macapp r14d5 / Apple Frameworks / WASTE / Source / WEBirthDeath.c < prev    next >
MacBinary  |  2000-02-25  |  25.3 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Fri Feb 25 05:00:00 2000, modified Fri Feb 25 05:00:00 2000, creator 'CWIE', type ASCII, 25254 bytes "WEBirthDeath.c" , at 0x6326 286 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 57 45 42 69 72 74 | 68 44 65 61 74 68 2e 63 |..WEBirt|hDeath.c|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 00 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 62 a6 00 | 00 01 1e b4 dc 03 20 b4 |.....b..|...... .|
|00000060| dc 03 20 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.. .....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ce 85 00 00 |........|........|
|00000080| 2f 2a 0d 20 2a 09 57 45 | 42 69 72 74 68 44 65 61 |/*. *.WE|BirthDea|
|00000090| 74 68 2e 63 0d 20 2a 0d | 20 2a 09 57 41 53 54 45 |th.c. *.| *.WASTE|
|000000a0| 20 50 52 4f 4a 45 43 54 | 0d 20 2a 20 20 43 72 65 | PROJECT|. * Cre|
|000000b0| 61 74 69 6f 6e 20 61 6e | 64 20 44 65 73 74 72 75 |ation an|d Destru|
|000000c0| 63 74 69 6f 6e 2c 20 53 | 74 61 6e 64 61 72 64 20 |ction, S|tandard |
|000000d0| 50 72 6f 63 73 2c 20 65 | 74 63 2e 0d 20 2a 0d 20 |Procs, e|tc.. *. |
|000000e0| 2a 20 20 43 6f 70 79 72 | 69 67 68 74 20 28 63 29 |* Copyr|ight (c)|
|000000f0| 20 31 39 39 33 2d 31 39 | 39 38 20 4d 61 72 63 6f | 1993-19|98 Marco|
|00000100| 20 50 69 6f 76 61 6e 65 | 6c 6c 69 0d 20 2a 09 41 | Piovane|lli. *.A|
|00000110| 6c 6c 20 52 69 67 68 74 | 73 20 52 65 73 65 72 76 |ll Right|s Reserv|
|00000120| 65 64 0d 20 2a 0d 20 2a | 20 20 43 20 70 6f 72 74 |ed. *. *| C port|
|00000130| 20 62 79 20 44 61 6e 20 | 43 72 65 76 69 65 72 0d | by Dan |Crevier.|
|00000140| 20 2a 0d 20 2a 2f 0d 0d | 2f 2a 0d 09 50 6f 72 74 | *. */..|/*..Port|
|00000150| 69 6f 6e 73 20 63 6f 70 | 79 72 69 67 68 74 20 a9 |ions cop|yright .|
|00000160| 20 31 39 39 38 2d 31 39 | 39 39 20 62 79 20 41 70 | 1998-19|99 by Ap|
|00000170| 70 6c 65 20 43 6f 6d 70 | 75 74 65 72 2c 20 49 6e |ple Comp|uter, In|
|00000180| 63 2e 20 41 6c 6c 20 72 | 69 67 68 74 73 20 72 65 |c. All r|ights re|
|00000190| 73 65 72 76 65 64 2e 0d | 20 2a 2f 0d 0d 2f 2a 0d |served..| */../*.|
|000001a0| 09 43 68 61 6e 67 65 20 | 48 69 73 74 6f 72 79 3a |.Change |History:|
|000001b0| 0d 09 09 31 32 2f 31 30 | 2f 39 39 09 43 68 61 6e |...12/10|/99.Chan|
|000001c0| 67 65 64 20 47 45 4e 45 | 52 41 54 49 4e 47 43 46 |ged GENE|RATINGCF|
|000001d0| 4d 20 74 6f 20 54 41 52 | 47 45 54 5f 52 54 5f 4d |M to TAR|GET_RT_M|
|000001e0| 41 43 5f 43 46 4d 20 61 | 6e 64 0d 09 09 09 09 09 |AC_CFM a|nd......|
|000001f0| 09 09 47 45 4e 45 52 41 | 54 49 4e 47 36 38 4b 20 |..GENERA|TING68K |
|00000200| 74 6f 20 54 41 52 47 45 | 54 5f 43 50 55 5f 36 38 |to TARGE|T_CPU_68|
|00000210| 4b 2e 0d 09 09 31 31 2f | 31 35 2f 39 39 09 41 64 |K....11/|15/99.Ad|
|00000220| 64 20 73 74 79 6c 65 72 | 73 2e 20 0d 09 09 31 31 |d styler|s. ...11|
|00000230| 2f 31 33 2f 39 39 09 43 | 6c 65 61 72 20 74 68 65 |/13/99.C|lear the|
|00000240| 20 6f 62 6a 65 63 74 20 | 72 65 66 65 72 65 6e 63 | object |referenc|
|00000250| 65 20 61 66 74 65 72 20 | 66 72 65 65 69 6e 67 2e |e after |freeing.|
|00000260| 20 0d 09 09 31 30 2f 32 | 39 2f 39 38 09 5a 6f 6f | ...10/2|9/98.Zoo|
|00000270| 6d 20 73 75 70 70 6f 72 | 74 2e 20 0d 2a 2f 0d 0d |m suppor|t. .*/..|
|00000280| 0d 23 69 6e 63 6c 75 64 | 65 20 22 57 41 53 54 45 |.#includ|e "WASTE|
|00000290| 49 6e 74 66 2e 68 22 0d | 0d 23 69 66 20 54 41 52 |Intf.h".|.#if TAR|
|000002a0| 47 45 54 5f 52 54 5f 4d | 41 43 5f 43 46 4d 0d 23 |GET_RT_M|AC_CFM.#|
|000002b0| 69 66 6e 64 65 66 20 5f | 5f 43 4f 44 45 46 52 41 |ifndef _|_CODEFRA|
|000002c0| 47 4d 45 4e 54 53 5f 5f | 0d 23 69 6e 63 6c 75 64 |GMENTS__|.#includ|
|000002d0| 65 20 3c 43 6f 64 65 46 | 72 61 67 6d 65 6e 74 73 |e <CodeF|ragments|
|000002e0| 2e 68 3e 0d 23 65 6e 64 | 69 66 0d 23 65 6e 64 69 |.h>.#end|if.#endi|
|000002f0| 66 0d 0d 63 6f 6e 73 74 | 20 50 6f 69 6e 74 20 6b |f..const| Point k|
|00000300| 4f 6e 65 54 6f 4f 6e 65 | 53 63 61 6c 69 6e 67 20 |OneToOne|Scaling |
|00000310| 3d 20 7b 20 31 2c 20 31 | 20 7d 3b 0d 0d 2f 2f 20 |= { 1, 1| };..// |
|00000320| 73 74 61 74 69 63 20 76 | 61 72 69 61 62 6c 65 73 |static v|ariables|
|00000330| 0d 0d 73 74 61 74 69 63 | 20 57 45 44 72 61 77 54 |..static| WEDrawT|
|00000340| 65 78 74 55 50 50 09 09 | 5f 77 65 53 74 64 44 72 |extUPP..|_weStdDr|
|00000350| 61 77 54 65 78 74 50 72 | 6f 63 20 3d 20 6e 69 6c |awTextPr|oc = nil|
|00000360| 3b 0d 73 74 61 74 69 63 | 20 57 45 50 69 78 65 6c |;.static| WEPixel|
|00000370| 54 6f 43 68 61 72 55 50 | 50 09 09 5f 77 65 53 74 |ToCharUP|P.._weSt|
|00000380| 64 50 69 78 65 6c 54 6f | 43 68 61 72 50 72 6f 63 |dPixelTo|CharProc|
|00000390| 20 3d 20 6e 69 6c 3b 0d | 73 74 61 74 69 63 20 57 | = nil;.|static W|
|000003a0| 45 43 68 61 72 54 6f 50 | 69 78 65 6c 55 50 50 09 |ECharToP|ixelUPP.|
|000003b0| 09 5f 77 65 53 74 64 43 | 68 61 72 54 6f 50 69 78 |._weStdC|harToPix|
|000003c0| 65 6c 50 72 6f 63 20 3d | 20 6e 69 6c 3b 0d 73 74 |elProc =| nil;.st|
|000003d0| 61 74 69 63 20 57 45 4c | 69 6e 65 42 72 65 61 6b |atic WEL|ineBreak|
|000003e0| 55 50 50 09 09 5f 77 65 | 53 74 64 4c 69 6e 65 42 |UPP.._we|StdLineB|
|000003f0| 72 65 61 6b 50 72 6f 63 | 20 3d 20 6e 69 6c 3b 0d |reakProc| = nil;.|
|00000400| 73 74 61 74 69 63 20 57 | 45 57 6f 72 64 42 72 65 |static W|EWordBre|
|00000410| 61 6b 55 50 50 09 09 5f | 77 65 53 74 64 57 6f 72 |akUPP.._|weStdWor|
|00000420| 64 42 72 65 61 6b 50 72 | 6f 63 20 3d 20 6e 69 6c |dBreakPr|oc = nil|
|00000430| 3b 0d 73 74 61 74 69 63 | 20 57 45 43 68 61 72 42 |;.static| WECharB|
|00000440| 79 74 65 55 50 50 09 09 | 5f 77 65 53 74 64 43 68 |yteUPP..|_weStdCh|
|00000450| 61 72 42 79 74 65 50 72 | 6f 63 20 3d 20 6e 69 6c |arBytePr|oc = nil|
|00000460| 3b 0d 73 74 61 74 69 63 | 20 57 45 43 68 61 72 54 |;.static| WECharT|
|00000470| 79 70 65 55 50 50 09 09 | 5f 77 65 53 74 64 43 68 |ypeUPP..|_weStdCh|
|00000480| 61 72 54 79 70 65 50 72 | 6f 63 20 3d 20 6e 69 6c |arTypePr|oc = nil|
|00000490| 3b 0d 73 74 61 74 69 63 | 20 57 45 43 6c 69 63 6b |;.static| WEClick|
|000004a0| 4c 6f 6f 70 55 50 50 09 | 09 5f 77 65 53 74 64 43 |LoopUPP.|._weStdC|
|000004b0| 6c 69 63 6b 4c 6f 6f 70 | 50 72 6f 63 20 3d 20 6e |lickLoop|Proc = n|
|000004c0| 69 6c 3b 0d 23 69 66 20 | 57 41 53 54 45 5f 44 52 |il;.#if |WASTE_DR|
|000004d0| 41 47 5f 41 4e 44 5f 44 | 52 4f 50 0d 73 74 61 74 |AG_AND_D|ROP.stat|
|000004e0| 69 63 20 57 45 48 69 6c | 69 74 65 44 72 6f 70 41 |ic WEHil|iteDropA|
|000004f0| 72 65 61 55 50 50 09 5f | 77 65 53 74 64 48 69 6c |reaUPP._|weStdHil|
|00000500| 69 74 65 44 72 6f 70 41 | 72 65 61 50 72 6f 63 20 |iteDropA|reaProc |
|00000510| 3d 20 6e 69 6c 3b 0d 23 | 65 6e 64 69 66 0d 73 74 |= nil;.#|endif.st|
|00000520| 61 74 69 63 20 57 45 45 | 72 61 73 65 55 50 50 09 |atic WEE|raseUPP.|
|00000530| 09 09 5f 77 65 53 74 64 | 45 72 61 73 65 50 72 6f |.._weStd|ErasePro|
|00000540| 63 20 3d 20 6e 69 6c 3b | 0d 0d 73 74 61 74 69 63 |c = nil;|..static|
|00000550| 20 70 61 73 63 61 6c 20 | 76 6f 69 64 20 5f 57 45 | pascal |void _WE|
|00000560| 53 74 64 44 72 61 77 54 | 65 78 74 28 50 74 72 20 |StdDrawT|ext(Ptr |
|00000570| 70 54 65 78 74 2c 20 53 | 49 6e 74 33 32 20 74 65 |pText, S|Int32 te|
|00000580| 78 74 4c 65 6e 67 74 68 | 2c 20 46 69 78 65 64 20 |xtLength|, Fixed |
|00000590| 73 6c 6f 70 2c 0d 09 09 | 09 09 4a 75 73 74 53 74 |slop,...|..JustSt|
|000005a0| 79 6c 65 43 6f 64 65 20 | 73 74 79 6c 65 52 75 6e |yleCode |styleRun|
|000005b0| 50 6f 73 69 74 69 6f 6e | 2c 20 57 45 48 61 6e 64 |Position|, WEHand|
|000005c0| 6c 65 20 68 57 45 29 0d | 7b 0d 23 70 72 61 67 6d |le hWE).|{.#pragm|
|000005d0| 61 20 75 6e 75 73 65 64 | 28 68 57 45 29 0d 0d 23 |a unused|(hWE)..#|
|000005e0| 69 66 20 57 41 53 54 45 | 5f 53 43 41 4c 45 0d 09 |if WASTE|_SCALE..|
|000005f0| 63 6f 6e 73 74 20 50 6f | 69 6e 74 20 73 63 61 6c |const Po|int scal|
|00000600| 65 4e 75 6d 65 72 20 3d | 20 28 2a 68 57 45 29 2d |eNumer =| (*hWE)-|
|00000610| 3e 73 63 61 6c 65 4e 75 | 6d 65 72 3b 0d 09 63 6f |>scaleNu|mer;..co|
|00000620| 6e 73 74 20 50 6f 69 6e | 74 20 73 63 61 6c 65 44 |nst Poin|t scaleD|
|00000630| 65 6e 6f 6d 20 3d 20 28 | 2a 68 57 45 29 2d 3e 73 |enom = (|*hWE)->s|
|00000640| 63 61 6c 65 44 65 6e 6f | 6d 3b 0d 23 65 6c 73 65 |caleDeno|m;.#else|
|00000650| 0d 09 63 6f 6e 73 74 20 | 50 6f 69 6e 74 20 73 63 |..const |Point sc|
|00000660| 61 6c 65 4e 75 6d 65 72 | 20 3d 20 6b 4f 6e 65 54 |aleNumer| = kOneT|
|00000670| 6f 4f 6e 65 53 63 61 6c | 69 6e 67 3b 0d 09 63 6f |oOneScal|ing;..co|
|00000680| 6e 73 74 20 50 6f 69 6e | 74 20 73 63 61 6c 65 44 |nst Poin|t scaleD|
|00000690| 65 6e 6f 6d 20 3d 20 6b | 4f 6e 65 54 6f 4f 6e 65 |enom = k|OneToOne|
|000006a0| 53 63 61 6c 69 6e 67 3b | 0d 23 65 6e 64 69 66 0d |Scaling;|.#endif.|
|000006b0| 0d 09 44 72 61 77 4a 75 | 73 74 69 66 69 65 64 28 |..DrawJu|stified(|
|000006c0| 70 54 65 78 74 2c 20 74 | 65 78 74 4c 65 6e 67 74 |pText, t|extLengt|
|000006d0| 68 2c 20 73 6c 6f 70 2c | 20 73 74 79 6c 65 52 75 |h, slop,| styleRu|
|000006e0| 6e 50 6f 73 69 74 69 6f | 6e 2c 20 73 63 61 6c 65 |nPositio|n, scale|
|000006f0| 4e 75 6d 65 72 2c 20 73 | 63 61 6c 65 44 65 6e 6f |Numer, s|caleDeno|
|00000700| 6d 29 3b 0d 7d 0d 0d 73 | 74 61 74 69 63 20 70 61 |m);.}..s|tatic pa|
|00000710| 73 63 61 6c 20 53 49 6e | 74 33 32 20 5f 57 45 53 |scal SIn|t32 _WES|
|00000720| 74 64 50 69 78 65 6c 54 | 6f 43 68 61 72 28 50 74 |tdPixelT|oChar(Pt|
|00000730| 72 20 70 54 65 78 74 2c | 20 53 49 6e 74 33 32 20 |r pText,| SInt32 |
|00000740| 74 65 78 74 4c 65 6e 67 | 74 68 2c 20 46 69 78 65 |textLeng|th, Fixe|
|00000750| 64 20 73 6c 6f 70 2c 0d | 09 09 09 09 46 69 78 65 |d slop,.|....Fixe|
|00000760| 64 20 2a 77 69 64 74 68 | 2c 20 57 45 45 64 67 65 |d *width|, WEEdge|
|00000770| 20 2a 65 64 67 65 2c 20 | 4a 75 73 74 53 74 79 6c | *edge, |JustStyl|
|00000780| 65 43 6f 64 65 20 73 74 | 79 6c 65 52 75 6e 50 6f |eCode st|yleRunPo|
|00000790| 73 69 74 69 6f 6e 2c 0d | 09 09 09 09 46 69 78 65 |sition,.|....Fixe|
|000007a0| 64 20 68 50 6f 73 2c 20 | 57 45 48 61 6e 64 6c 65 |d hPos, |WEHandle|
|000007b0| 20 68 57 45 29 0d 7b 0d | 23 70 72 61 67 6d 61 20 | hWE).{.|#pragma |
|000007c0| 75 6e 75 73 65 64 28 68 | 50 6f 73 2c 20 68 57 45 |unused(h|Pos, hWE|
|000007d0| 29 0d 09 46 69 78 65 64 | 20 6c 61 73 74 57 69 64 |)..Fixed| lastWid|
|000007e0| 74 68 3b 0d 09 53 49 6e | 74 33 32 20 6f 66 66 73 |th;..SIn|t32 offs|
|000007f0| 65 74 3b 0d 0d 23 69 66 | 20 57 41 53 54 45 5f 53 |et;..#if| WASTE_S|
|00000800| 43 41 4c 45 0d 09 63 6f | 6e 73 74 20 50 6f 69 6e |CALE..co|nst Poin|
|00000810| 74 20 73 63 61 6c 65 4e | 75 6d 65 72 20 3d 20 28 |t scaleN|umer = (|
|00000820| 2a 68 57 45 29 2d 3e 73 | 63 61 6c 65 4e 75 6d 65 |*hWE)->s|caleNume|
|00000830| 72 3b 0d 09 63 6f 6e 73 | 74 20 50 6f 69 6e 74 20 |r;..cons|t Point |
|00000840| 73 63 61 6c 65 44 65 6e | 6f 6d 20 3d 20 28 2a 68 |scaleDen|om = (*h|
|00000850| 57 45 29 2d 3e 73 63 61 | 6c 65 44 65 6e 6f 6d 3b |WE)->sca|leDenom;|
|00000860| 0d 23 65 6c 73 65 0d 09 | 63 6f 6e 73 74 20 50 6f |.#else..|const Po|
|00000870| 69 6e 74 20 73 63 61 6c | 65 4e 75 6d 65 72 20 3d |int scal|eNumer =|
|00000880| 20 6b 4f 6e 65 54 6f 4f | 6e 65 53 63 61 6c 69 6e | kOneToO|neScalin|
|00000890| 67 3b 0d 09 63 6f 6e 73 | 74 20 50 6f 69 6e 74 20 |g;..cons|t Point |
|000008a0| 73 63 61 6c 65 44 65 6e | 6f 6d 20 3d 20 6b 4f 6e |scaleDen|om = kOn|
|000008b0| 65 54 6f 4f 6e 65 53 63 | 61 6c 69 6e 67 3b 0d 23 |eToOneSc|aling;.#|
|000008c0| 65 6e 64 69 66 0d 0d 09 | 6c 61 73 74 57 69 64 74 |endif...|lastWidt|
|000008d0| 68 20 3d 20 2a 77 69 64 | 74 68 3b 0d 09 6f 66 66 |h = *wid|th;..off|
|000008e0| 73 65 74 20 3d 20 50 69 | 78 65 6c 54 6f 43 68 61 |set = Pi|xelToCha|
|000008f0| 72 28 70 54 65 78 74 2c | 20 74 65 78 74 4c 65 6e |r(pText,| textLen|
|00000900| 67 74 68 2c 20 73 6c 6f | 70 2c 20 6c 61 73 74 57 |gth, slo|p, lastW|
|00000910| 69 64 74 68 2c 20 28 42 | 6f 6f 6c 65 61 6e 20 2a |idth, (B|oolean *|
|00000920| 29 20 65 64 67 65 2c 0d | 09 09 77 69 64 74 68 2c |) edge,.|..width,|
|00000930| 20 73 74 79 6c 65 52 75 | 6e 50 6f 73 69 74 69 6f | styleRu|nPositio|
|00000940| 6e 2c 20 73 63 61 6c 65 | 4e 75 6d 65 72 2c 20 73 |n, scale|Numer, s|
|00000950| 63 61 6c 65 44 65 6e 6f | 6d 29 3b 0d 0d 09 2f 2f |caleDeno|m);...//|
|00000960| 20 72 6f 75 6e 64 20 77 | 69 64 74 68 20 74 6f 20 | round w|idth to |
|00000970| 6e 65 61 72 65 73 74 20 | 69 6e 74 65 67 65 72 20 |nearest |integer |
|00000980| 76 61 6c 75 65 0d 09 2f | 2f 20 28 74 68 69 73 20 |value../|/ (this |
|00000990| 69 73 20 73 75 70 70 6f | 73 65 64 20 74 6f 20 66 |is suppo|sed to f|
|000009a0| 69 78 20 61 6e 20 69 6e | 63 6f 6d 70 61 74 69 62 |ix an in|compatib|
|000009b0| 69 6c 69 74 79 20 77 69 | 74 68 20 74 68 65 20 57 |ility wi|th the W|
|000009c0| 6f 72 6c 64 53 63 72 69 | 70 74 20 50 6f 77 65 72 |orldScri|pt Power|
|000009d0| 20 41 64 61 70 74 65 72 | 29 0d 09 2a 77 69 64 74 | Adapter|)..*widt|
|000009e0| 68 20 3d 20 28 2a 77 69 | 64 74 68 20 2b 20 30 78 |h = (*wi|dth + 0x|
|000009f0| 30 30 30 30 38 30 30 30 | 29 20 26 20 30 78 46 46 |00008000|) & 0xFF|
|00000a00| 46 46 30 30 30 30 3b 0d | 0d 09 72 65 74 75 72 6e |FF0000;.|..return|
|00000a10| 20 6f 66 66 73 65 74 3b | 0d 7d 0d 0d 73 74 61 74 | offset;|.}..stat|
|00000a20| 69 63 20 70 61 73 63 61 | 6c 20 53 49 6e 74 31 36 |ic pasca|l SInt16|
|00000a30| 20 5f 57 45 53 74 64 43 | 68 61 72 54 6f 50 69 78 | _WEStdC|harToPix|
|00000a40| 65 6c 28 50 74 72 20 70 | 54 65 78 74 2c 20 53 49 |el(Ptr p|Text, SI|
|00000a50| 6e 74 33 32 20 74 65 78 | 74 4c 65 6e 67 74 68 2c |nt32 tex|tLength,|
|00000a60| 20 46 69 78 65 64 20 73 | 6c 6f 70 2c 0d 09 09 09 | Fixed s|lop,....|
|00000a70| 09 53 49 6e 74 33 32 20 | 6f 66 66 73 65 74 2c 20 |.SInt32 |offset, |
|00000a80| 53 49 6e 74 31 36 20 64 | 69 72 65 63 74 69 6f 6e |SInt16 d|irection|
|00000a90| 2c 20 4a 75 73 74 53 74 | 79 6c 65 43 6f 64 65 20 |, JustSt|yleCode |
|00000aa0| 73 74 79 6c 65 52 75 6e | 50 6f 73 69 74 69 6f 6e |styleRun|Position|
|00000ab0| 2c 0d 09 09 09 09 53 49 | 6e 74 31 36 20 68 50 6f |,.....SI|nt16 hPo|
|00000ac0| 73 2c 20 57 45 48 61 6e | 64 6c 65 20 68 57 45 29 |s, WEHan|dle hWE)|
|00000ad0| 0d 7b 0d 23 70 72 61 67 | 6d 61 20 75 6e 75 73 65 |.{.#prag|ma unuse|
|00000ae0| 64 28 68 50 6f 73 2c 20 | 68 57 45 29 0d 0d 23 69 |d(hPos, |hWE)..#i|
|00000af0| 66 20 57 41 53 54 45 5f | 53 43 41 4c 45 0d 09 63 |f WASTE_|SCALE..c|
|00000b00| 6f 6e 73 74 20 50 6f 69 | 6e 74 20 73 63 61 6c 65 |onst Poi|nt scale|
|00000b10| 4e 75 6d 65 72 20 3d 20 | 28 2a 68 57 45 29 2d 3e |Numer = |(*hWE)->|
|00000b20| 73 63 61 6c 65 4e 75 6d | 65 72 3b 0d 09 63 6f 6e |scaleNum|er;..con|
|00000b30| 73 74 20 50 6f 69 6e 74 | 20 73 63 61 6c 65 44 65 |st Point| scaleDe|
|00000b40| 6e 6f 6d 20 3d 20 28 2a | 68 57 45 29 2d 3e 73 63 |nom = (*|hWE)->sc|
|00000b50| 61 6c 65 44 65 6e 6f 6d | 3b 0d 23 65 6c 73 65 0d |aleDenom|;.#else.|
|00000b60| 09 63 6f 6e 73 74 20 50 | 6f 69 6e 74 20 73 63 61 |.const P|oint sca|
|00000b70| 6c 65 4e 75 6d 65 72 20 | 3d 20 6b 4f 6e 65 54 6f |leNumer |= kOneTo|
|00000b80| 4f 6e 65 53 63 61 6c 69 | 6e 67 3b 0d 09 63 6f 6e |OneScali|ng;..con|
|00000b90| 73 74 20 50 6f 69 6e 74 | 20 73 63 61 6c 65 44 65 |st Point| scaleDe|
|00000ba0| 6e 6f 6d 20 3d 20 6b 4f | 6e 65 54 6f 4f 6e 65 53 |nom = kO|neToOneS|
|00000bb0| 63 61 6c 69 6e 67 3b 0d | 23 65 6e 64 69 66 0d 0d |caling;.|#endif..|
|00000bc0| 09 72 65 74 75 72 6e 20 | 43 68 61 72 54 6f 50 69 |.return |CharToPi|
|00000bd0| 78 65 6c 28 70 54 65 78 | 74 2c 20 74 65 78 74 4c |xel(pTex|t, textL|
|00000be0| 65 6e 67 74 68 2c 20 73 | 6c 6f 70 2c 20 6f 66 66 |ength, s|lop, off|
|00000bf0| 73 65 74 2c 20 64 69 72 | 65 63 74 69 6f 6e 2c 0d |set, dir|ection,.|
|00000c00| 09 09 09 73 74 79 6c 65 | 52 75 6e 50 6f 73 69 74 |...style|RunPosit|
|00000c10| 69 6f 6e 2c 20 73 63 61 | 6c 65 4e 75 6d 65 72 2c |ion, sca|leNumer,|
|00000c20| 20 73 63 61 6c 65 44 65 | 6e 6f 6d 29 3b 0d 7d 0d | scaleDe|nom);.}.|
|00000c30| 0d 73 74 61 74 69 63 20 | 70 61 73 63 61 6c 20 53 |.static |pascal S|
|00000c40| 74 79 6c 65 64 4c 69 6e | 65 42 72 65 61 6b 43 6f |tyledLin|eBreakCo|
|00000c50| 64 65 20 5f 57 45 52 6f | 6d 61 6e 4c 69 6e 65 42 |de _WERo|manLineB|
|00000c60| 72 65 61 6b 0d 09 28 0d | 09 09 50 74 72 20 70 54 |reak..(.|..Ptr pT|
|00000c70| 65 78 74 2c 0d 09 09 53 | 49 6e 74 33 32 20 74 65 |ext,...S|Int32 te|
|00000c80| 78 74 4c 65 6e 67 74 68 | 2c 0d 09 09 53 49 6e 74 |xtLength|,...SInt|
|00000c90| 33 32 20 74 65 78 74 53 | 74 61 72 74 2c 0d 09 09 |32 textS|tart,...|
|00000ca0| 53 49 6e 74 33 32 20 74 | 65 78 74 45 6e 64 2c 0d |SInt32 t|extEnd,.|
|00000cb0| 09 09 46 69 78 65 64 20 | 2a 20 74 65 78 74 57 69 |..Fixed |* textWi|
|00000cc0| 64 74 68 2c 0d 09 09 53 | 49 6e 74 33 32 20 2a 20 |dth,...S|Int32 * |
|00000cd0| 74 65 78 74 4f 66 66 73 | 65 74 2c 0d 09 09 57 45 |textOffs|et,...WE|
|00000ce0| 48 61 6e 64 6c 65 20 77 | 65 0d 09 29 0d 7b 0d 23 |Handle w|e..).{.#|
|00000cf0| 69 66 20 57 41 53 54 45 | 5f 53 43 41 4c 45 0d 09 |if WASTE|_SCALE..|
|00000d00| 63 6f 6e 73 74 20 50 6f | 69 6e 74 20 73 63 61 6c |const Po|int scal|
|00000d10| 65 4e 75 6d 65 72 20 3d | 20 28 2a 77 65 29 2d 3e |eNumer =| (*we)->|
|00000d20| 73 63 61 6c 65 4e 75 6d | 65 72 3b 0d 09 63 6f 6e |scaleNum|er;..con|
|00000d30| 73 74 20 50 6f 69 6e 74 | 20 73 63 61 6c 65 44 65 |st Point| scaleDe|
|00000d40| 6e 6f 6d 20 3d 20 28 2a | 77 65 29 2d 3e 73 63 61 |nom = (*|we)->sca|
|00000d50| 6c 65 44 65 6e 6f 6d 3b | 0d 23 65 6c 73 65 0d 23 |leDenom;|.#else.#|
|00000d60| 70 72 61 67 6d 61 20 75 | 6e 75 73 65 64 28 77 65 |pragma u|nused(we|
|00000d70| 29 0d 09 63 6f 6e 73 74 | 20 50 6f 69 6e 74 20 73 |)..const| Point s|
|00000d80| 63 61 6c 65 4e 75 6d 65 | 72 20 3d 20 6b 4f 6e 65 |caleNume|r = kOne|
|00000d90| 54 6f 4f 6e 65 53 63 61 | 6c 69 6e 67 3b 0d 09 63 |ToOneSca|ling;..c|
|00000da0| 6f 6e 73 74 20 50 6f 69 | 6e 74 20 73 63 61 6c 65 |onst Poi|nt scale|
|00000db0| 44 65 6e 6f 6d 20 3d 20 | 6b 4f 6e 65 54 6f 4f 6e |Denom = |kOneToOn|
|00000dc0| 65 53 63 61 6c 69 6e 67 | 3b 0d 23 65 6e 64 69 66 |eScaling|;.#endif|
|00000dd0| 0d 0d 09 53 49 6e 74 33 | 32 20 6f 66 66 73 65 74 |...SInt3|2 offset|
|00000de0| 20 3d 20 30 2c 20 72 61 | 77 4f 66 66 73 65 74 20 | = 0, ra|wOffset |
|00000df0| 3b 0d 09 53 74 79 6c 65 | 64 4c 69 6e 65 42 72 65 |;..Style|dLineBre|
|00000e00| 61 6b 43 6f 64 65 20 62 | 72 65 61 6b 43 6f 64 65 |akCode b|reakCode|
|00000e10| 20 3d 20 73 6d 42 72 65 | 61 6b 4f 76 65 72 66 6c | = smBre|akOverfl|
|00000e20| 6f 77 20 3b 0d 09 57 45 | 45 64 67 65 20 65 64 67 |ow ;..WE|Edge edg|
|00000e30| 65 20 3b 0d 0d 09 2f 2f | 09 64 6f 20 6e 6f 74 68 |e ;...//|.do noth|
|00000e40| 69 6e 67 20 69 66 20 77 | 65 20 77 65 72 65 20 63 |ing if w|e were c|
|00000e50| 61 6c 6c 65 64 20 66 6f | 72 20 61 6e 20 65 6d 70 |alled fo|r an emp|
|00000e60| 74 79 20 6c 69 6e 65 0d | 09 69 66 20 28 20 74 65 |ty line.|.if ( te|
|00000e70| 78 74 4c 65 6e 67 74 68 | 20 3d 3d 20 30 20 29 0d |xtLength| == 0 ).|
|00000e80| 09 7b 0d 09 09 67 6f 74 | 6f 20 65 78 69 74 20 3b |.{...got|o exit ;|
|00000e90| 0d 09 7d 0d 0d 09 2f 2f | 09 66 69 72 73 74 20 6c |..}...//|.first l|
|00000ea0| 6f 6f 6b 20 66 6f 72 20 | 43 52 73 0d 09 66 6f 72 |ook for |CRs..for|
|00000eb0| 20 28 20 6f 66 66 73 65 | 74 20 3d 20 74 65 78 74 | ( offse|t = text|
|00000ec0| 53 74 61 72 74 20 3b 20 | 6f 66 66 73 65 74 20 3c |Start ; |offset <|
|00000ed0| 20 74 65 78 74 45 6e 64 | 20 3b 20 6f 66 66 73 65 | textEnd| ; offse|
|00000ee0| 74 20 2b 2b 20 29 0d 09 | 7b 0d 09 09 69 66 20 28 |t ++ )..|{...if (|
|00000ef0| 20 70 54 65 78 74 20 5b | 20 6f 66 66 73 65 74 20 | pText [| offset |
|00000f00| 5d 20 3d 3d 20 6b 45 4f | 4c 20 29 0d 09 09 7b 0d |] == kEO|L )...{.|
|00000f10| 09 09 09 2f 2f 09 69 66 | 20 61 20 43 52 20 69 73 |...//.if| a CR is|
|00000f20| 20 66 6f 75 6e 64 2c 20 | 69 67 6e 6f 72 65 20 65 | found, |ignore e|
|00000f30| 76 65 72 79 74 68 69 6e | 67 20 74 68 61 74 20 66 |verythin|g that f|
|00000f40| 6f 6c 6c 6f 77 73 20 61 | 6e 64 20 62 65 20 73 75 |ollows a|nd be su|
|00000f50| 72 65 20 74 6f 0d 09 09 | 09 2f 2f 09 65 76 65 6e |re to...|.//.even|
|00000f60| 74 75 61 6c 6c 79 20 62 | 72 65 61 6b 20 74 68 65 |tually b|reak the|
|00000f70| 20 6c 69 6e 65 0d 09 09 | 09 74 65 78 74 45 6e 64 | line...|.textEnd|
|00000f80| 20 3d 20 6f 66 66 73 65 | 74 20 2b 20 31 20 3b 0d | = offse|t + 1 ;.|
|00000f90| 09 09 09 62 72 65 61 6b | 43 6f 64 65 20 3d 20 73 |...break|Code = s|
|00000fa0| 6d 42 72 65 61 6b 57 6f | 72 64 20 3b 0d 09 09 09 |mBreakWo|rd ;....|
|00000fb0| 62 72 65 61 6b 20 3b 0d | 09 09 7d 0d 09 7d 0d 0d |break ;.|..}..}..|
|00000fc0| 09 2f 2f 09 66 69 6e 64 | 20 22 72 61 77 22 20 62 |.//.find| "raw" b|
|00000fd0| 72 65 61 6b 20 6f 66 66 | 73 65 74 0d 09 72 61 77 |reak off|set..raw|
|00000fe0| 4f 66 66 73 65 74 20 3d | 20 74 65 78 74 53 74 61 |Offset =| textSta|
|00000ff0| 72 74 20 2b 20 50 69 78 | 65 6c 54 6f 43 68 61 72 |rt + Pix|elToChar|
|00001000| 20 28 20 70 54 65 78 74 | 20 2b 20 74 65 78 74 53 | ( pText| + textS|
|00001010| 74 61 72 74 2c 20 74 65 | 78 74 45 6e 64 20 2d 20 |tart, te|xtEnd - |
|00001020| 74 65 78 74 53 74 61 72 | 74 2c 20 30 2c 0d 09 09 |textStar|t, 0,...|
|00001030| 09 2a 20 74 65 78 74 57 | 69 64 74 68 2c 20 28 20 |.* textW|idth, ( |
|00001040| 42 6f 6f 6c 65 61 6e 20 | 2a 20 29 20 26 20 65 64 |Boolean |* ) & ed|
|00001050| 67 65 2c 20 74 65 78 74 | 57 69 64 74 68 2c 0d 09 |ge, text|Width,..|
|00001060| 09 09 6f 6e 6c 79 53 74 | 79 6c 65 52 75 6e 2c 20 |..onlySt|yleRun, |
|00001070| 73 63 61 6c 65 4e 75 6d | 65 72 2c 20 73 63 61 6c |scaleNum|er, scal|
|00001080| 65 44 65 6e 6f 6d 20 29 | 20 3b 0d 09 69 66 20 28 |eDenom )| ;..if (|
|00001090| 20 65 64 67 65 20 3d 3d | 20 6b 54 72 61 69 6c 69 | edge ==| kTraili|
|000010a0| 6e 67 45 64 67 65 20 29 | 20 72 61 77 4f 66 66 73 |ngEdge )| rawOffs|
|000010b0| 65 74 20 2d 2d 20 3b 0d | 0d 09 2f 2f 09 69 66 20 |et -- ;.|..//.if |
|000010c0| 74 65 78 74 57 69 64 74 | 68 20 68 61 73 20 67 6f |textWidt|h has go|
|000010d0| 6e 65 20 6e 65 67 61 74 | 69 76 65 2c 20 77 65 20 |ne negat|ive, we |
|000010e0| 6e 65 65 64 20 74 6f 20 | 62 72 65 61 6b 20 6e 6f |need to |break no|
|000010f0| 77 0d 09 69 66 20 28 20 | 2a 20 74 65 78 74 57 69 |w..if ( |* textWi|
|00001100| 64 74 68 20 3c 20 30 20 | 29 0d 09 7b 0d 09 09 2f |dth < 0 |)..{.../|
|00001110| 2f 09 66 69 6e 64 20 61 | 20 73 75 69 74 61 62 6c |/.find a| suitabl|
|00001120| 65 20 62 72 65 61 6b 20 | 70 6f 69 6e 74 0d 09 09 |e break |point...|
|00001130| 66 6f 72 20 28 20 6f 66 | 66 73 65 74 20 3d 20 72 |for ( of|fset = r|
|00001140| 61 77 4f 66 66 73 65 74 | 20 3b 20 6f 66 66 73 65 |awOffset| ; offse|
|00001150| 74 20 3e 20 30 20 3b 20 | 6f 66 66 73 65 74 20 2d |t > 0 ; |offset -|
|00001160| 2d 20 29 0d 09 09 7b 0d | 09 09 09 2f 2f 09 6c 6f |- )...{.|...//.lo|
|00001170| 6f 6b 20 66 6f 72 20 61 | 20 62 72 65 61 6b 69 6e |ok for a| breakin|
|00001180| 67 20 63 68 61 72 61 63 | 74 65 72 20 28 65 76 65 |g charac|ter (eve|
|00001190| 72 79 74 68 69 6e 67 20 | 77 68 6f 73 65 20 41 53 |rything |whose AS|
|000011a0| 43 49 49 20 63 6f 64 65 | 20 3c 3d 20 30 78 32 30 |CII code| <= 0x20|
|000011b0| 29 0d 09 09 09 69 66 20 | 28 20 28 20 75 6e 73 69 |)....if |( ( unsi|
|000011c0| 67 6e 65 64 20 63 68 61 | 72 20 29 20 70 54 65 78 |gned cha|r ) pTex|
|000011d0| 74 20 5b 20 6f 66 66 73 | 65 74 20 2d 20 31 20 5d |t [ offs|et - 1 ]|
|000011e0| 20 3c 3d 20 27 20 27 20 | 29 0d 09 09 09 7b 0d 09 | <= ' ' |)....{..|
|000011f0| 09 09 09 69 66 20 28 20 | 6f 66 66 73 65 74 20 3d |...if ( |offset =|
|00001200| 3d 20 72 61 77 4f 66 66 | 73 65 74 20 29 0d 09 09 |= rawOff|set )...|
|00001210| 09 09 7b 0d 09 09 09 09 | 09 2f 2f 09 69 66 20 72 |..{.....|.//.if r|
|00001220| 61 77 4f 66 66 73 65 74 | 20 70 6f 69 6e 74 73 20 |awOffset| points |
|00001230| 74 6f 20 61 20 62 72 65 | 61 6b 69 6e 67 20 63 68 |to a bre|aking ch|
|00001240| 61 72 61 63 74 65 72 20 | 61 6c 72 65 61 64 79 2c |aracter |already,|
|00001250| 0d 09 09 09 09 09 2f 2f | 09 73 6b 69 70 20 61 6e |......//|.skip an|
|00001260| 79 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 62 6c 61 6e |y follow|ing blan|
|00001270| 6b 73 0d 09 09 09 09 09 | 66 6f 72 20 28 20 3b 20 |ks......|for ( ; |
|00001280| 28 20 6f 66 66 73 65 74 | 20 3c 20 74 65 78 74 45 |( offset| < textE|
|00001290| 6e 64 20 29 20 26 26 20 | 28 20 28 20 75 6e 73 69 |nd ) && |( ( unsi|
|000012a0| 67 6e 65 64 20 63 68 61 | 72 20 29 20 70 54 65 78 |gned cha|r ) pTex|
|000012b0| 74 20 5b 20 6f 66 66 73 | 65 74 20 5d 20 3c 3d 20 |t [ offs|et ] <= |
|000012c0| 27 20 27 20 29 20 3b 20 | 6f 66 66 73 65 74 20 2b |' ' ) ; |offset +|
|000012d0| 2b 20 29 0d 09 09 09 09 | 09 09 3b 0d 09 09 09 09 |+ ).....|..;.....|
|000012e0| 7d 0d 09 09 09 09 62 72 | 65 61 6b 43 6f 64 65 20 |}.....br|eakCode |
|000012f0| 3d 20 73 6d 42 72 65 61 | 6b 57 6f 72 64 20 3b 0d |= smBrea|kWord ;.|
|00001300| 09 09 09 09 67 6f 74 6f | 20 65 78 69 74 20 3b 0d |....goto| exit ;.|
|00001310| 09 09 09 7d 0d 09 09 7d | 0d 0d 09 09 2f 2f 09 77 |...}...}|....//.w|
|00001320| 65 20 6e 65 65 64 20 74 | 6f 20 62 72 65 61 6b 20 |e need t|o break |
|00001330| 62 75 74 20 77 65 72 65 | 20 75 6e 61 62 6c 65 20 |but were| unable |
|00001340| 74 6f 20 66 69 6e 64 20 | 61 20 70 72 6f 70 65 72 |to find |a proper|
|00001350| 20 62 72 65 61 6b 69 6e | 67 20 63 68 61 72 61 63 | breakin|g charac|
|00001360| 74 65 72 0d 09 09 2f 2f | 09 61 73 20 61 20 6c 61 |ter...//|.as a la|
|00001370| 73 74 20 72 65 73 6f 72 | 74 2c 20 62 72 65 61 6b |st resor|t, break|
|00001380| 20 74 68 65 20 6c 69 6e | 65 20 6f 6e 20 61 20 6e | the lin|e on a n|
|00001390| 6f 6e 2d 62 72 65 61 6b | 69 6e 67 20 63 68 61 72 |on-break|ing char|
|000013a0| 61 63 74 65 72 0d 09 09 | 6f 66 66 73 65 74 20 3d |acter...|offset =|
|000013b0| 20 72 61 77 4f 66 66 73 | 65 74 20 3b 0d 09 09 62 | rawOffs|et ;...b|
|000013c0| 72 65 61 6b 43 6f 64 65 | 20 3d 20 73 6d 42 72 65 |reakCode| = smBre|
|000013d0| 61 6b 43 68 61 72 20 3b | 0d 09 7d 0d 09 65 6c 73 |akChar ;|..}..els|
|000013e0| 65 0d 09 7b 0d 09 09 2f | 2f 09 77 65 27 6c 6c 20 |e..{.../|/.we'll |
|000013f0| 62 72 65 61 6b 20 74 68 | 69 73 20 6c 69 6e 65 20 |break th|is line |
|00001400| 6c 61 74 65 72 0d 09 09 | 6f 66 66 73 65 74 20 3d |later...|offset =|
|00001410| 20 74 65 78 74 45 6e 64 | 20 3b 0d 09 7d 0d 0d 0d | textEnd| ;..}...|
|00001420| 65 78 69 74 20 3a 0d 09 | 2a 20 74 65 78 74 4f 66 |exit :..|* textOf|
|00001430| 66 73 65 74 20 3d 20 6f | 66 66 73 65 74 20 3b 0d |fset = o|ffset ;.|
|00001440| 09 72 65 74 75 72 6e 20 | 62 72 65 61 6b 43 6f 64 |.return |breakCod|
|00001450| 65 20 3b 0d 7d 0d 0d 73 | 74 61 74 69 63 20 70 61 |e ;.}..s|tatic pa|
|00001460| 73 63 61 6c 20 53 74 79 | 6c 65 64 4c 69 6e 65 42 |scal Sty|ledLineB|
|00001470| 72 65 61 6b 43 6f 64 65 | 20 5f 57 45 53 74 64 4c |reakCode| _WEStdL|
|00001480| 69 6e 65 42 72 65 61 6b | 28 50 74 72 20 70 54 65 |ineBreak|(Ptr pTe|
|00001490| 78 74 2c 20 53 49 6e 74 | 33 32 20 74 65 78 74 4c |xt, SInt|32 textL|
|000014a0| 65 6e 67 74 68 2c 0d 09 | 09 09 09 53 49 6e 74 33 |ength,..|...SInt3|
|000014b0| 32 20 74 65 78 74 53 74 | 61 72 74 2c 20 53 49 6e |2 textSt|art, SIn|
|000014c0| 74 33 32 20 74 65 78 74 | 45 6e 64 2c 20 46 69 78 |t32 text|End, Fix|
|000014d0| 65 64 20 2a 74 65 78 74 | 57 69 64 74 68 2c 0d 09 |ed *text|Width,..|
|000014e0| 09 09 09 53 49 6e 74 33 | 32 20 2a 74 65 78 74 4f |...SInt3|2 *textO|
|000014f0| 66 66 73 65 74 2c 20 57 | 45 48 61 6e 64 6c 65 20 |ffset, W|EHandle |
|00001500| 68 57 45 29 0d 7b 0d 23 | 70 72 61 67 6d 61 20 75 |hWE).{.#|pragma u|
|00001510| 6e 75 73 65 64 28 68 57 | 45 29 0d 09 72 65 74 75 |nused(hW|E)..retu|
|00001520| 72 6e 20 53 74 79 6c 65 | 64 4c 69 6e 65 42 72 65 |rn Style|dLineBre|
|00001530| 61 6b 28 70 54 65 78 74 | 2c 20 74 65 78 74 4c 65 |ak(pText|, textLe|
|00001540| 6e 67 74 68 2c 20 74 65 | 78 74 53 74 61 72 74 2c |ngth, te|xtStart,|
|00001550| 20 74 65 78 74 45 6e 64 | 2c 20 30 2c 20 74 65 78 | textEnd|, 0, tex|
|00001560| 74 57 69 64 74 68 2c 0d | 09 09 09 09 74 65 78 74 |tWidth,.|....text|
|00001570| 4f 66 66 73 65 74 29 3b | 0d 7d 0d 0d 73 74 61 74 |Offset);|.}..stat|
|00001580| 69 63 20 70 61 73 63 61 | 6c 20 76 6f 69 64 20 5f |ic pasca|l void _|
|00001590| 57 45 53 74 64 57 6f 72 | 64 42 72 65 61 6b 28 50 |WEStdWor|dBreak(P|
|000015a0| 74 72 20 70 54 65 78 74 | 2c 20 53 49 6e 74 31 36 |tr pText|, SInt16|
|000015b0| 20 74 65 78 74 4c 65 6e | 67 74 68 2c 20 53 49 6e | textLen|gth, SIn|
|000015c0| 74 31 36 20 6f 66 66 73 | 65 74 2c 0d 09 09 09 09 |t16 offs|et,.....|
|000015d0| 57 45 45 64 67 65 20 65 | 64 67 65 2c 20 4f 66 66 |WEEdge e|dge, Off|
|000015e0| 73 65 74 54 61 62 6c 65 | 20 62 72 65 61 6b 4f 66 |setTable| breakOf|
|000015f0| 66 73 65 74 73 2c 20 53 | 63 72 69 70 74 43 6f 64 |fsets, S|criptCod|
|00001600| 65 20 73 63 72 69 70 74 | 2c 0d 09 09 09 09 57 45 |e script|,.....WE|
|00001610| 48 61 6e 64 6c 65 20 68 | 57 45 29 0d 7b 0d 23 70 |Handle h|WE).{.#p|
|00001620| 72 61 67 6d 61 20 75 6e | 75 73 65 64 28 68 57 45 |ragma un|used(hWE|
|00001630| 29 0d 09 46 69 6e 64 57 | 6f 72 64 42 72 65 61 6b |)..FindW|ordBreak|
|00001640| 73 28 70 54 65 78 74 2c | 20 74 65 78 74 4c 65 6e |s(pText,| textLen|
|00001650| 67 74 68 2c 20 6f 66 66 | 73 65 74 2c 20 28 42 6f |gth, off|set, (Bo|
|00001660| 6f 6c 65 61 6e 29 20 65 | 64 67 65 2c 20 6e 69 6c |olean) e|dge, nil|
|00001670| 2c 20 62 72 65 61 6b 4f | 66 66 73 65 74 73 2c 20 |, breakO|ffsets, |
|00001680| 73 63 72 69 70 74 29 3b | 0d 7d 0d 0d 73 74 61 74 |script);|.}..stat|
|00001690| 69 63 20 70 61 73 63 61 | 6c 20 53 49 6e 74 31 36 |ic pasca|l SInt16|
|000016a0| 20 5f 57 45 53 74 64 43 | 68 61 72 42 79 74 65 28 | _WEStdC|harByte(|
|000016b0| 50 74 72 20 70 54 65 78 | 74 2c 20 53 49 6e 74 31 |Ptr pTex|t, SInt1|
|000016c0| 36 20 74 65 78 74 4f 66 | 66 73 65 74 2c 20 53 63 |6 textOf|fset, Sc|
|000016d0| 72 69 70 74 43 6f 64 65 | 20 73 63 72 69 70 74 2c |riptCode| script,|
|000016e0| 0d 09 09 09 09 57 45 48 | 61 6e 64 6c 65 20 68 57 |.....WEH|andle hW|
|000016f0| 45 29 0d 7b 0d 23 70 72 | 61 67 6d 61 20 75 6e 75 |E).{.#pr|agma unu|
|00001700| 73 65 64 28 68 57 45 29 | 0d 09 72 65 74 75 72 6e |sed(hWE)|..return|
|00001710| 20 43 68 61 72 61 63 74 | 65 72 42 79 74 65 54 79 | Charact|erByteTy|
|00001720| 70 65 28 70 54 65 78 74 | 2c 20 74 65 78 74 4f 66 |pe(pText|, textOf|
|00001730| 66 73 65 74 2c 20 73 63 | 72 69 70 74 29 3b 0d 7d |fset, sc|ript);.}|
|00001740| 0d 0d 73 74 61 74 69 63 | 20 70 61 73 63 61 6c 20 |..static| pascal |
|00001750| 53 49 6e 74 31 36 20 5f | 57 45 53 74 64 43 68 61 |SInt16 _|WEStdCha|
|00001760| 72 54 79 70 65 28 50 74 | 72 20 70 54 65 78 74 2c |rType(Pt|r pText,|
|00001770| 20 53 49 6e 74 31 36 20 | 74 65 78 74 4f 66 66 73 | SInt16 |textOffs|
|00001780| 65 74 2c 20 53 63 72 69 | 70 74 43 6f 64 65 20 73 |et, Scri|ptCode s|
|00001790| 63 72 69 70 74 2c 0d 09 | 09 09 09 57 45 48 61 6e |cript,..|...WEHan|
|000017a0| 64 6c 65 20 68 57 45 29 | 0d 7b 0d 23 70 72 61 67 |dle hWE)|.{.#prag|
|000017b0| 6d 61 20 75 6e 75 73 65 | 64 28 68 57 45 29 0d 09 |ma unuse|d(hWE)..|
|000017c0| 72 65 74 75 72 6e 20 43 | 68 61 72 61 63 74 65 72 |return C|haracter|
|000017d0| 54 79 70 65 28 70 54 65 | 78 74 2c 20 74 65 78 74 |Type(pTe|xt, text|
|000017e0| 4f 66 66 73 65 74 2c 20 | 73 63 72 69 70 74 29 3b |Offset, |script);|
|000017f0| 0d 7d 0d 0d 2f 2f 09 5f | 57 45 53 63 72 69 70 74 |.}..//._|WEScript|
|00001800| 54 6f 46 6f 6e 74 2c 20 | 5f 57 45 4f 6c 64 57 6f |ToFont, |_WEOldWo|
|00001810| 72 64 42 72 65 61 6b 2c | 20 5f 57 45 4f 6c 64 43 |rdBreak,| _WEOldC|
|00001820| 68 61 72 42 79 74 65 20 | 61 6e 64 20 5f 57 45 4f |harByte |and _WEO|
|00001830| 6c 64 43 68 61 72 54 79 | 70 65 0d 2f 2f 09 61 72 |ldCharTy|pe.//.ar|
|00001840| 65 20 6f 6e 6c 79 20 6e | 65 65 64 65 64 20 74 6f |e only n|eeded to|
|00001850| 20 73 75 70 70 6f 72 74 | 20 76 65 72 73 69 6f 6e | support| version|
|00001860| 20 37 2e 30 20 2f 20 37 | 2e 30 2e 31 20 6f 66 20 | 7.0 / 7|.0.1 of |
|00001870| 4d 61 63 4f 53 3b 0d 2f | 2f 09 43 46 4d 2d 62 61 |MacOS;./|/.CFM-ba|
|00001880| 73 65 64 20 63 6f 64 65 | 20 28 62 6f 74 68 20 50 |sed code| (both P|
|00001890| 6f 77 65 72 50 43 20 61 | 6e 64 20 43 46 4d 36 38 |owerPC a|nd CFM68|
|000018a0| 4b 29 20 64 6f 65 73 6e | 27 74 20 6e 65 65 64 20 |K) doesn|'t need |
|000018b0| 74 68 65 73 65 20 72 6f | 75 74 69 6e 65 73 0d 2f |these ro|utines./|
|000018c0| 2f 09 61 73 20 74 68 65 | 20 43 6f 64 65 20 46 72 |/.as the| Code Fr|
|000018d0| 61 67 6d 65 6e 74 20 4d | 61 6e 61 67 65 72 20 72 |agment M|anager r|
|000018e0| 65 71 75 69 72 65 73 20 | 61 74 20 6c 65 61 73 74 |equires |at least|
|000018f0| 20 4d 61 63 4f 53 20 37 | 2e 31 2e 32 0d 2f 2f 09 | MacOS 7|.1.2.//.|
|00001900| 28 6f 6e 20 74 68 65 20 | 50 6f 77 65 72 50 43 29 |(on the |PowerPC)|
|00001910| 20 6f 72 20 4d 61 63 4f | 53 20 37 2e 31 20 28 66 | or MacO|S 7.1 (f|
|00001920| 6f 72 20 43 46 4d 36 38 | 4b 29 0d 0d 23 69 66 20 |or CFM68|K)..#if |
|00001930| 21 20 28 53 79 73 74 65 | 6d 53 65 76 65 6e 46 69 |! (Syste|mSevenFi|
|00001940| 76 65 4f 72 4c 61 74 65 | 72 20 7c 7c 20 54 41 52 |veOrLate|r || TAR|
|00001950| 47 45 54 5f 52 54 5f 4d | 41 43 5f 43 46 4d 29 0d |GET_RT_M|AC_CFM).|
|00001960| 0d 70 61 73 63 61 6c 20 | 53 49 6e 74 31 36 20 5f |.pascal |SInt16 _|
|00001970| 57 45 53 63 72 69 70 74 | 54 6f 46 6f 6e 74 28 53 |WEScript|ToFont(S|
|00001980| 63 72 69 70 74 43 6f 64 | 65 20 73 63 72 69 70 74 |criptCod|e script|
|00001990| 29 0d 7b 0d 09 2f 2f 20 | 67 69 76 65 6e 20 61 6e |).{..// |given an|
|000019a0| 20 65 78 70 6c 69 63 69 | 74 20 73 63 72 69 70 74 | explici|t script|
|000019b0| 20 63 6f 64 65 2c 20 72 | 65 74 75 72 6e 20 74 68 | code, r|eturn th|
|000019c0| 65 20 66 69 72 73 74 20 | 66 6f 6e 74 20 49 44 20 |e first |font ID |
|000019d0| 69 6e 20 74 68 65 20 63 | 6f 72 72 65 73 70 6f 6e |in the c|orrespon|
|000019e0| 64 69 6e 67 20 72 61 6e | 67 65 0d 09 2f 2f 20 66 |ding ran|ge..// f|
|000019f0| 6f 72 20 61 6e 20 65 78 | 70 6c 61 6e 61 74 69 6f |or an ex|planatio|
|00001a00| 6e 20 6f 66 20 74 68 65 | 20 66 6f 72 6d 75 6c 61 |n of the| formula|
|00001a10| 20 67 69 76 65 6e 20 62 | 65 6c 6f 77 2c 20 73 65 | given b|elow, se|
|00001a20| 65 20 49 4d 3a 20 54 65 | 78 74 2c 20 70 61 67 65 |e IM: Te|xt, page|
|00001a30| 20 42 2d 38 0d 0d 09 69 | 66 20 28 73 63 72 69 70 | B-8...i|f (scrip|
|00001a40| 74 20 3d 3d 20 73 6d 52 | 6f 6d 61 6e 29 0d 09 7b |t == smR|oman)..{|
|00001a50| 0d 09 09 72 65 74 75 72 | 6e 20 32 3b 0d 09 7d 0d |...retur|n 2;..}.|
|00001a60| 09 65 6c 73 65 20 69 66 | 20 28 28 73 63 72 69 70 |.else if| ((scrip|
|00001a70| 74 20 3e 20 73 6d 52 6f | 6d 61 6e 29 20 26 26 20 |t > smRo|man) && |
|00001a80| 28 73 63 72 69 70 74 20 | 3c 3d 20 73 6d 55 6e 69 |(script |<= smUni|
|00001a90| 6e 74 65 72 70 29 29 0d | 09 7b 0d 09 09 72 65 74 |nterp)).|.{...ret|
|00001aa0| 75 72 6e 20 28 30 78 33 | 45 30 30 20 2b 20 30 78 |urn (0x3|E00 + 0x|
|00001ab0| 32 30 30 20 2a 20 73 63 | 72 69 70 74 29 3b 0d 09 |200 * sc|ript);..|
|00001ac0| 7d 0d 09 65 6c 73 65 0d | 09 7b 0d 09 09 72 65 74 |}..else.|.{...ret|
|00001ad0| 75 72 6e 20 73 79 73 74 | 65 6d 46 6f 6e 74 3b 09 |urn syst|emFont;.|
|00001ae0| 2f 2f 20 75 6e 6b 6e 6f | 77 6e 20 73 63 72 69 70 |// unkno|wn scrip|
|00001af0| 74 20 63 6f 64 65 20 28 | 3f 29 0d 09 7d 0d 7d 0d |t code (|?)..}.}.|
|00001b00| 0d 73 74 61 74 69 63 20 | 70 61 73 63 61 6c 20 76 |.static |pascal v|
|00001b10| 6f 69 64 20 5f 57 45 4f | 6c 64 57 6f 72 64 42 72 |oid _WEO|ldWordBr|
|00001b20| 65 61 6b 28 50 74 72 20 | 70 54 65 78 74 2c 20 53 |eak(Ptr |pText, S|
|00001b30| 49 6e 74 31 36 20 74 65 | 78 74 4c 65 6e 67 74 68 |Int16 te|xtLength|
|00001b40| 2c 20 53 49 6e 74 31 36 | 20 6f 66 66 73 65 74 2c |, SInt16| offset,|
|00001b50| 0d 09 09 09 09 57 45 45 | 64 67 65 20 65 64 67 65 |.....WEE|dge edge|
|00001b60| 2c 20 4f 66 66 73 65 74 | 54 61 62 6c 65 20 62 72 |, Offset|Table br|
|00001b70| 65 61 6b 4f 66 66 73 65 | 74 73 2c 20 53 63 72 69 |eakOffse|ts, Scri|
|00001b80| 70 74 43 6f 64 65 20 73 | 63 72 69 70 74 2c 0d 09 |ptCode s|cript,..|
|00001b90| 09 09 09 57 45 48 61 6e | 64 6c 65 20 68 57 45 29 |...WEHan|dle hWE)|
|00001ba0| 0d 7b 0d 09 47 72 61 66 | 50 74 72 20 73 61 76 65 |.{..Graf|Ptr save|
|00001bb0| 50 6f 72 74 2c 20 74 65 | 6d 70 50 6f 72 74 3b 0d |Port, te|mpPort;.|
|00001bc0| 09 53 49 6e 74 31 36 20 | 73 61 76 65 46 6f 6e 74 |.SInt16 |saveFont|
|00001bd0| 3b 0d 0d 09 2f 2f 20 74 | 68 65 20 6f 6c 64 20 28 |;...// t|he old (|
|00001be0| 6e 6f 77 20 6f 62 73 6f | 6c 65 74 65 29 20 46 69 |now obso|lete) Fi|
|00001bf0| 6e 64 57 6f 72 64 20 72 | 6f 75 74 69 6e 65 20 67 |ndWord r|outine g|
|00001c00| 65 74 73 20 61 6e 20 69 | 6d 70 6c 69 63 69 74 20 |ets an i|mplicit |
|00001c10| 73 63 72 69 70 74 20 70 | 61 72 61 6d 65 74 65 72 |script p|arameter|
|00001c20| 20 74 68 72 6f 75 67 68 | 0d 09 2f 2f 20 74 68 65 | through|..// the|
|00001c30| 20 63 75 72 72 65 6e 74 | 20 67 72 61 70 68 69 63 | current| graphic|
|00001c40| 73 20 70 6f 72 74 20 74 | 78 46 6f 6e 74 20 66 69 |s port t|xFont fi|
|00001c50| 65 6c 64 2c 20 73 6f 20 | 66 69 72 73 74 20 6f 66 |eld, so |first of|
|00001c60| 20 61 6c 6c 20 77 65 20 | 6d 75 73 74 20 68 61 76 | all we |must hav|
|00001c70| 65 20 61 20 76 61 6c 69 | 64 20 70 6f 72 74 0d 09 |e a vali|d port..|
|00001c80| 47 65 74 50 6f 72 74 28 | 26 73 61 76 65 50 6f 72 |GetPort(|&savePor|
|00001c90| 74 29 3b 0d 09 74 65 6d | 70 50 6f 72 74 20 3d 20 |t);..tem|pPort = |
|00001ca0| 28 2a 68 57 45 29 2d 3e | 70 6f 72 74 3b 0d 09 4d |(*hWE)->|port;..M|
|00001cb0| 61 63 53 65 74 50 6f 72 | 74 28 74 65 6d 70 50 6f |acSetPor|t(tempPo|
|00001cc0| 72 74 29 3b 0d 0d 09 2f | 2f 20 74 68 65 6e 20 73 |rt);.../|/ then s|
|00001cd0| 65 74 20 74 68 65 20 74 | 78 46 6f 6e 74 20 66 69 |et the t|xFont fi|
|00001ce0| 65 6c 64 20 74 6f 20 61 | 20 66 6f 6e 74 20 6e 75 |eld to a| font nu|
|00001cf0| 6d 62 65 72 20 69 6e 20 | 74 68 65 20 73 70 65 63 |mber in |the spec|
|00001d00| 69 66 69 65 64 20 73 63 | 72 69 70 74 20 72 61 6e |ified sc|ript ran|
|00001d10| 67 65 0d 09 73 61 76 65 | 46 6f 6e 74 20 3d 20 47 |ge..save|Font = G|
|00001d20| 65 74 54 65 78 74 46 6f | 6e 74 28 74 65 6d 70 50 |etTextFo|nt(tempP|
|00001d30| 6f 72 74 29 3b 0d 0d 09 | 54 65 78 74 46 6f 6e 74 |ort);...|TextFont|
|00001d40| 28 5f 57 45 53 63 72 69 | 70 74 54 6f 46 6f 6e 74 |(_WEScri|ptToFont|
|00001d50| 28 73 63 72 69 70 74 29 | 29 3b 0d 0d 09 2f 2f 20 |(script)|);...// |
|00001d60| 63 61 6c 6c 20 5f 46 69 | 6e 64 57 6f 72 64 20 28 |call _Fi|ndWord (|
|00001d70| 6e 6f 77 20 46 69 6e 64 | 57 6f 72 64 42 72 65 61 |now Find|WordBrea|
|00001d80| 6b 73 29 0d 09 46 69 6e | 64 57 6f 72 64 42 72 65 |ks)..Fin|dWordBre|
|00001d90| 61 6b 73 28 70 54 65 78 | 74 2c 20 74 65 78 74 4c |aks(pTex|t, textL|
|00001da0| 65 6e 67 74 68 2c 20 6f | 66 66 73 65 74 2c 20 28 |ength, o|ffset, (|
|00001db0| 42 6f 6f 6c 65 61 6e 29 | 65 64 67 65 2c 20 6e 69 |Boolean)|edge, ni|
|00001dc0| 6c 2c 20 62 72 65 61 6b | 4f 66 66 73 65 74 73 2c |l, break|Offsets,|
|00001dd0| 20 73 6d 52 6f 6d 61 6e | 29 3b 0d 0d 09 2f 2f 20 | smRoman|);...// |
|00001de0| 72 65 73 74 6f 72 65 20 | 66 6f 6e 74 20 61 6e 64 |restore |font and|
|00001df0| 20 70 6f 72 74 0d 09 54 | 65 78 74 46 6f 6e 74 28 | port..T|extFont(|
|00001e00| 73 61 76 65 46 6f 6e 74 | 29 3b 0d 09 4d 61 63 53 |saveFont|);..MacS|
|00001e10| 65 74 50 6f 72 74 28 73 | 61 76 65 50 6f 72 74 29 |etPort(s|avePort)|
|00001e20| 3b 0d 0d 7d 0d 0d 73 74 | 61 74 69 63 20 70 61 73 |;..}..st|atic pas|
|00001e30| 63 61 6c 20 53 49 6e 74 | 31 36 20 5f 57 45 4f 6c |cal SInt|16 _WEOl|
|00001e40| 64 43 68 61 72 42 79 74 | 65 28 50 74 72 20 70 54 |dCharByt|e(Ptr pT|
|00001e50| 65 78 74 2c 20 53 49 6e | 74 31 36 20 74 65 78 74 |ext, SIn|t16 text|
|00001e60| 4f 66 66 73 65 74 2c 20 | 53 63 72 69 70 74 43 6f |Offset, |ScriptCo|
|00001e70| 64 65 20 73 63 72 69 70 | 74 2c 0d 09 09 09 09 57 |de scrip|t,.....W|
|00001e80| 45 48 61 6e 64 6c 65 20 | 68 57 45 29 0d 7b 0d 09 |EHandle |hWE).{..|
|00001e90| 47 72 61 66 50 74 72 20 | 73 61 76 65 50 6f 72 74 |GrafPtr |savePort|
|00001ea0| 2c 20 74 65 6d 70 50 6f | 72 74 3b 0d 09 53 49 6e |, tempPo|rt;..SIn|
|00001eb0| 74 31 36 20 73 61 76 65 | 46 6f 6e 74 3b 0d 09 53 |t16 save|Font;..S|
|00001ec0| 49 6e 74 31 36 20 72 65 | 74 56 61 6c 3b 0d 0d 09 |Int16 re|tVal;...|
|00001ed0| 2f 2f 20 74 68 65 20 6f | 6c 64 20 28 6e 6f 77 20 |// the o|ld (now |
|00001ee0| 6f 62 73 6f 6c 65 74 65 | 29 20 43 68 61 72 42 79 |obsolete|) CharBy|
|00001ef0| 74 65 20 72 6f 75 74 69 | 6e 65 20 67 65 74 73 20 |te routi|ne gets |
|00001f00| 61 6e 20 69 6d 70 6c 69 | 63 69 74 20 73 63 72 69 |an impli|cit scri|
|00001f10| 70 74 20 70 61 72 61 6d | 65 74 65 72 20 74 68 72 |pt param|eter thr|
|00001f20| 6f 75 67 68 0d 09 2f 2f | 20 74 68 65 20 63 75 72 |ough..//| the cur|
|00001f30| 72 65 6e 74 20 67 72 61 | 70 68 69 63 73 20 70 6f |rent gra|phics po|
|00001f40| 72 74 20 74 78 46 6f 6e | 74 20 66 69 65 6c 64 2c |rt txFon|t field,|
|00001f50| 20 73 6f 20 66 69 72 73 | 74 20 6f 66 20 61 6c 6c | so firs|t of all|
|00001f60| 20 77 65 20 6d 75 73 74 | 20 68 61 76 65 20 61 20 | we must| have a |
|00001f70| 76 61 6c 69 64 20 70 6f | 72 74 0d 09 47 65 74 50 |valid po|rt..GetP|
|00001f80| 6f 72 74 28 26 73 61 76 | 65 50 6f 72 74 29 3b 0d |ort(&sav|ePort);.|
|00001f90| 09 74 65 6d 70 50 6f 72 | 74 20 3d 20 28 2a 68 57 |.tempPor|t = (*hW|
|00001fa0| 45 29 2d 3e 70 6f 72 74 | 3b 0d 09 4d 61 63 53 65 |E)->port|;..MacSe|
|00001fb0| 74 50 6f 72 74 28 74 65 | 6d 70 50 6f 72 74 29 3b |tPort(te|mpPort);|
|00001fc0| 0d 0d 09 2f 2f 20 74 68 | 65 6e 20 73 65 74 20 74 |...// th|en set t|
|00001fd0| 68 65 20 74 78 46 6f 6e | 74 20 66 69 65 6c 64 20 |he txFon|t field |
|00001fe0| 74 6f 20 61 20 66 6f 6e | 74 20 6e 75 6d 62 65 72 |to a fon|t number|
|00001ff0| 20 69 6e 20 74 68 65 20 | 73 70 65 63 69 66 69 65 | in the |specifie|
|00002000| 64 20 73 63 72 69 70 74 | 20 72 61 6e 67 65 0d 09 |d script| range..|
|00002010| 73 61 76 65 46 6f 6e 74 | 20 3d 20 47 65 74 54 65 |saveFont| = GetTe|
|00002020| 78 74 46 6f 6e 74 28 74 | 65 6d 70 50 6f 72 74 29 |xtFont(t|empPort)|
|00002030| 3b 0d 09 54 65 78 74 46 | 6f 6e 74 28 5f 57 45 53 |;..TextF|ont(_WES|
|00002040| 63 72 69 70 74 54 6f 46 | 6f 6e 74 28 73 63 72 69 |criptToF|ont(scri|
|00002050| 70 74 29 29 3b 0d 0d 09 | 2f 2f 20 63 61 6c 6c 20 |pt));...|// call |
|00002060| 5f 43 68 61 72 42 79 74 | 65 0d 09 72 65 74 56 61 |_CharByt|e..retVa|
|00002070| 6c 20 3d 20 43 68 61 72 | 61 63 74 65 72 42 79 74 |l = Char|acterByt|
|00002080| 65 54 79 70 65 28 70 54 | 65 78 74 2c 20 74 65 78 |eType(pT|ext, tex|
|00002090| 74 4f 66 66 73 65 74 2c | 20 73 6d 52 6f 6d 61 6e |tOffset,| smRoman|
|000020a0| 29 3b 0d 0d 09 2f 2f 20 | 72 65 73 74 6f 72 65 20 |);...// |restore |
|000020b0| 66 6f 6e 74 20 61 6e 64 | 20 70 6f 72 74 0d 09 54 |font and| port..T|
|000020c0| 65 78 74 46 6f 6e 74 28 | 73 61 76 65 46 6f 6e 74 |extFont(|saveFont|
|000020d0| 29 3b 0d 09 4d 61 63 53 | 65 74 50 6f 72 74 28 73 |);..MacS|etPort(s|
|000020e0| 61 76 65 50 6f 72 74 29 | 3b 0d 0d 09 72 65 74 75 |avePort)|;...retu|
|000020f0| 72 6e 20 72 65 74 56 61 | 6c 3b 0d 7d 0d 0d 73 74 |rn retVa|l;.}..st|
|00002100| 61 74 69 63 20 70 61 73 | 63 61 6c 20 53 49 6e 74 |atic pas|cal SInt|
|00002110| 31 36 20 5f 57 45 4f 6c | 64 43 68 61 72 54 79 70 |16 _WEOl|dCharTyp|
|00002120| 65 28 50 74 72 20 70 54 | 65 78 74 2c 20 53 49 6e |e(Ptr pT|ext, SIn|
|00002130| 74 31 36 20 74 65 78 74 | 4f 66 66 73 65 74 2c 20 |t16 text|Offset, |
|00002140| 53 63 72 69 70 74 43 6f | 64 65 20 73 63 72 69 70 |ScriptCo|de scrip|
|00002150| 74 2c 0d 09 09 09 09 57 | 45 48 61 6e 64 6c 65 20 |t,.....W|EHandle |
|00002160| 68 57 45 29 0d 7b 0d 09 | 47 72 61 66 50 74 72 20 |hWE).{..|GrafPtr |
|00002170| 73 61 76 65 50 6f 72 74 | 2c 20 74 65 6d 70 50 6f |savePort|, tempPo|
|00002180| 72 74 3b 0d 09 53 49 6e | 74 31 36 20 73 61 76 65 |rt;..SIn|t16 save|
|00002190| 46 6f 6e 74 3b 0d 09 53 | 49 6e 74 31 36 20 72 65 |Font;..S|Int16 re|
|000021a0| 74 56 61 6c 3b 0d 0d 09 | 2f 2f 20 74 68 65 20 6f |tVal;...|// the o|
|000021b0| 6c 64 20 28 6e 6f 77 20 | 6f 62 73 6f 6c 65 74 65 |ld (now |obsolete|
|000021c0| 29 20 43 68 61 72 54 79 | 70 65 20 72 6f 75 74 69 |) CharTy|pe routi|
|000021d0| 6e 65 20 67 65 74 73 20 | 61 6e 20 69 6d 70 6c 69 |ne gets |an impli|
|000021e0| 63 69 74 20 73 63 72 69 | 70 74 20 70 61 72 61 6d |cit scri|pt param|
|000021f0| 65 74 65 72 20 74 68 72 | 6f 75 67 68 0d 09 2f 2f |eter thr|ough..//|
|00002200| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 67 72 61 | the cur|rent gra|
|00002210| 70 68 69 63 73 20 70 6f | 72 74 20 74 78 46 6f 6e |phics po|rt txFon|
|00002220| 74 20 66 69 65 6c 64 2c | 20 73 6f 20 66 69 72 73 |t field,| so firs|
|00002230| 74 20 6f 66 20 61 6c 6c | 20 77 65 20 6d 75 73 74 |t of all| we must|
|00002240| 20 68 61 76 65 20 61 20 | 76 61 6c 69 64 20 70 6f | have a |valid po|
|00002250| 72 74 0d 09 47 65 74 50 | 6f 72 74 28 26 73 61 76 |rt..GetP|ort(&sav|
|00002260| 65 50 6f 72 74 29 3b 0d | 09 74 65 6d 70 50 6f 72 |ePort);.|.tempPor|
|00002270| 74 20 3d 20 28 2a 68 57 | 45 29 2d 3e 70 6f 72 74 |t = (*hW|E)->port|
|00002280| 3b 0d 09 4d 61 63 53 65 | 74 50 6f 72 74 28 74 65 |;..MacSe|tPort(te|
|00002290| 6d 70 50 6f 72 74 29 3b | 0d 0d 09 2f 2f 20 74 68 |mpPort);|...// th|
|000022a0| 65 6e 20 73 65 74 20 74 | 68 65 20 74 78 46 6f 6e |en set t|he txFon|
|000022b0| 74 20 66 69 65 6c 64 20 | 74 6f 20 61 20 66 6f 6e |t field |to a fon|
|000022c0| 74 20 6e 75 6d 62 65 72 | 20 69 6e 20 74 68 65 20 |t number| in the |
|000022d0| 73 70 65 63 69 66 69 65 | 64 20 73 63 72 69 70 74 |specifie|d script|
|000022e0| 20 72 61 6e 67 65 0d 09 | 73 61 76 65 46 6f 6e 74 | range..|saveFont|
|000022f0| 20 3d 20 47 65 74 54 65 | 78 74 46 6f 6e 74 28 74 | = GetTe|xtFont(t|
|00002300| 65 6d 70 50 6f 72 74 29 | 3b 0d 09 54 65 78 74 46 |empPort)|;..TextF|
|00002310| 6f 6e 74 28 5f 57 45 53 | 63 72 69 70 74 54 6f 46 |ont(_WES|criptToF|
|00002320| 6f 6e 74 28 73 63 72 69 | 70 74 29 29 3b 0d 0d 09 |ont(scri|pt));...|
|00002330| 2f 2f 20 63 61 6c 6c 20 | 5f 43 68 61 72 54 79 70 |// call |_CharTyp|
|00002340| 65 0d 09 72 65 74 56 61 | 6c 20 3d 20 43 68 61 72 |e..retVa|l = Char|
|00002350| 61 63 74 65 72 42 79 74 | 65 54 79 70 65 28 70 54 |acterByt|eType(pT|
|00002360| 65 78 74 2c 20 74 65 78 | 74 4f 66 66 73 65 74 2c |ext, tex|tOffset,|
|00002370| 20 73 6d 52 6f 6d 61 6e | 29 3b 0d 0d 09 2f 2f 20 | smRoman|);...// |
|00002380| 72 65 73 74 6f 72 65 20 | 66 6f 6e 74 20 61 6e 64 |restore |font and|
|00002390| 20 70 6f 72 74 0d 09 54 | 65 78 74 46 6f 6e 74 28 | port..T|extFont(|
|000023a0| 73 61 76 65 46 6f 6e 74 | 29 3b 0d 09 4d 61 63 53 |saveFont|);..MacS|
|000023b0| 65 74 50 6f 72 74 28 73 | 61 76 65 50 6f 72 74 29 |etPort(s|avePort)|
|000023c0| 3b 0d 0d 09 72 65 74 75 | 72 6e 20 72 65 74 56 61 |;...retu|rn retVa|
|000023d0| 6c 3b 0d 0d 7d 0d 0d 23 | 65 6e 64 69 66 0d 0d 73 |l;..}..#|endif..s|
|000023e0| 74 61 74 69 63 20 70 61 | 73 63 61 6c 20 42 6f 6f |tatic pa|scal Boo|
|000023f0| 6c 65 61 6e 20 5f 57 45 | 53 74 64 43 6c 69 63 6b |lean _WE|StdClick|
|00002400| 4c 6f 6f 70 28 57 45 48 | 61 6e 64 6c 65 20 68 57 |Loop(WEH|andle hW|
|00002410| 45 29 0d 7b 0d 09 57 45 | 50 74 72 20 70 57 45 20 |E).{..WE|Ptr pWE |
|00002420| 3d 20 2a 68 57 45 3b 09 | 09 2f 2f 20 61 73 73 75 |= *hWE;.|.// assu|
|00002430| 6d 65 20 57 45 20 72 65 | 63 6f 72 64 20 69 73 20 |me WE re|cord is |
|00002440| 61 6c 72 65 61 64 79 20 | 6c 6f 63 6b 65 64 0d 09 |already |locked..|
|00002450| 50 6f 69 6e 74 20 6d 6f | 75 73 65 4c 6f 63 3b 0d |Point mo|useLoc;.|
|00002460| 09 53 49 6e 74 33 32 20 | 63 75 72 72 65 6e 74 4f |.SInt32 |currentO|
|00002470| 66 66 73 65 74 3b 0d 09 | 53 49 6e 74 33 32 20 6d |ffset;..|SInt32 m|
|00002480| 61 78 4f 66 66 73 65 74 | 3b 0d 09 53 49 6e 74 33 |axOffset|;..SInt3|
|00002490| 32 20 76 44 65 6c 74 61 | 20 3d 20 30 3b 0d 09 53 |2 vDelta| = 0;..S|
|000024a0| 49 6e 74 33 32 20 68 44 | 65 6c 74 61 20 3d 20 30 |Int32 hD|elta = 0|
|000024b0| 3b 0d 0d 09 2f 2f 20 64 | 6f 20 6e 6f 74 68 69 6e |;...// d|o nothin|
|000024c0| 67 20 69 66 20 61 75 74 | 6f 2d 73 63 72 6f 6c 6c |g if aut|o-scroll|
|000024d0| 20 69 73 20 64 69 73 61 | 62 6c 65 64 20 6f 72 20 | is disa|bled or |
|000024e0| 69 66 20 77 65 27 72 65 | 20 69 6e 61 63 74 69 76 |if we're| inactiv|
|000024f0| 65 0d 09 69 66 20 28 21 | 42 54 53 54 28 70 57 45 |e..if (!|BTST(pWE|
|00002500| 2d 3e 66 65 61 74 75 72 | 65 73 2c 20 77 65 46 41 |->featur|es, weFA|
|00002510| 75 74 6f 53 63 72 6f 6c | 6c 29 20 7c 7c 20 21 42 |utoScrol|l) || !B|
|00002520| 54 53 54 28 70 57 45 2d | 3e 66 6c 61 67 73 2c 20 |TST(pWE-|>flags, |
|00002530| 77 65 46 41 63 74 69 76 | 65 29 29 0d 09 7b 0d 09 |weFActiv|e))..{..|
|00002540| 09 72 65 74 75 72 6e 20 | 74 72 75 65 3b 0d 09 7d |.return |true;..}|
|00002550| 0d 0d 09 2f 2f 20 67 65 | 74 20 63 75 72 72 65 6e |...// ge|t curren|
|00002560| 74 20 6d 6f 75 73 65 20 | 6c 6f 63 61 74 69 6f 6e |t mouse |location|
|00002570| 2c 20 69 6e 20 6c 6f 63 | 61 6c 20 63 6f 6f 72 64 |, in loc|al coord|
|00002580| 73 0d 09 2f 2f 20 77 65 | 20 63 61 6e 20 73 61 66 |s..// we| can saf|
|00002590| 65 6c 79 20 61 73 73 75 | 6d 65 20 74 68 65 20 67 |ely assu|me the g|
|000025a0| 72 61 70 68 69 63 73 20 | 70 6f 72 74 20 69 73 20 |raphics |port is |
|000025b0| 73 65 74 20 75 70 20 63 | 6f 72 72 65 63 74 6c 79 |set up c|orrectly|
|000025c0| 0d 09 47 65 74 4d 6f 75 | 73 65 28 26 6d 6f 75 73 |..GetMou|se(&mous|
|000025d0| 65 4c 6f 63 29 3b 0d 0d | 09 2f 2f 20 48 41 4e 44 |eLoc);..|.// HAND|
|000025e0| 4c 45 20 56 45 52 54 49 | 43 41 4c 20 41 55 54 4f |LE VERTI|CAL AUTO|
|000025f0| 53 43 52 4f 4c 4c 0d 09 | 63 75 72 72 65 6e 74 4f |SCROLL..|currentO|
|00002600| 66 66 73 65 74 20 3d 20 | 70 57 45 2d 3e 76 69 65 |ffset = |pWE->vie|
|00002610| 77 52 65 63 74 2e 74 6f | 70 20 2d 20 70 57 45 2d |wRect.to|p - pWE-|
|00002620| 3e 64 65 73 74 52 65 63 | 74 2e 74 6f 70 3b 0d 09 |>destRec|t.top;..|
|00002630| 6d 61 78 4f 66 66 73 65 | 74 20 3d 20 28 70 57 45 |maxOffse|t = (pWE|
|00002640| 2d 3e 64 65 73 74 52 65 | 63 74 2e 62 6f 74 74 6f |->destRe|ct.botto|
|00002650| 6d 20 2d 20 70 57 45 2d | 3e 64 65 73 74 52 65 63 |m - pWE-|>destRec|
|00002660| 74 2e 74 6f 70 29 20 2d | 20 28 70 57 45 2d 3e 76 |t.top) -| (pWE->v|
|00002670| 69 65 77 52 65 63 74 2e | 62 6f 74 74 6f 6d 20 2d |iewRect.|bottom -|
|00002680| 20 70 57 45 2d 3e 76 69 | 65 77 52 65 63 74 2e 74 | pWE->vi|ewRect.t|
|00002690| 6f 70 29 3b 0d 0d 09 2f | 2f 20 69 73 20 74 68 65 |op);.../|/ is the|
|000026a0| 20 6d 6f 75 73 65 20 62 | 65 6c 6f 77 20 74 68 65 | mouse b|elow the|
|000026b0| 20 76 69 65 77 20 72 65 | 63 74 3f 0d 09 69 66 20 | view re|ct?..if |
|000026c0| 28 6d 6f 75 73 65 4c 6f | 63 2e 76 20 3e 20 70 57 |(mouseLo|c.v > pW|
|000026d0| 45 2d 3e 76 69 65 77 52 | 65 63 74 2e 62 6f 74 74 |E->viewR|ect.bott|
|000026e0| 6f 6d 29 0d 09 7b 0d 09 | 09 2f 2f 20 69 73 20 74 |om)..{..|.// is t|
|000026f0| 68 65 72 65 20 61 6e 79 | 74 68 69 6e 67 20 68 69 |here any|thing hi|
|00002700| 64 64 65 6e 20 62 65 6c | 6f 77 20 74 68 65 20 76 |dden bel|ow the v|
|00002710| 69 65 77 20 72 65 63 74 | 3f 0d 09 09 69 66 20 28 |iew rect|?...if (|
|00002720| 63 75 72 72 65 6e 74 4f | 66 66 73 65 74 20 3c 20 |currentO|ffset < |
|00002730| 6d 61 78 4f 66 66 73 65 | 74 29 0d 09 09 7b 0d 09 |maxOffse|t)...{..|
|00002740| 09 09 2f 2f 20 74 68 65 | 6e 20 73 63 72 6f 6c 6c |..// the|n scroll|
|00002750| 20 64 6f 77 6e 3a 20 63 | 61 6c 63 75 6c 61 74 65 | down: c|alculate|
|00002760| 20 74 68 65 20 73 63 72 | 6f 6c 6c 20 64 65 6c 74 | the scr|oll delt|
|00002770| 61 0d 09 09 09 76 44 65 | 6c 74 61 20 3d 20 70 57 |a....vDe|lta = pW|
|00002780| 45 2d 3e 76 69 65 77 52 | 65 63 74 2e 62 6f 74 74 |E->viewR|ect.bott|
|00002790| 6f 6d 20 2d 20 6d 6f 75 | 73 65 4c 6f 63 2e 76 3b |om - mou|seLoc.v;|
|000027a0| 0d 0d 09 09 09 2f 2f 20 | 70 69 6e 20 74 68 65 20 |.....// |pin the |
|000027b0| 6e 65 77 20 76 65 72 74 | 69 63 61 6c 20 6f 66 66 |new vert|ical off|
|000027c0| 73 65 74 20 74 6f 20 74 | 68 65 20 62 6f 74 74 6f |set to t|he botto|
|000027d0| 6d 20 6f 66 20 74 68 65 | 20 64 65 73 74 20 72 65 |m of the| dest re|
|000027e0| 63 74 61 6e 67 6c 65 0d | 09 09 09 69 66 20 28 76 |ctangle.|...if (v|
|000027f0| 44 65 6c 74 61 20 3c 20 | 28 63 75 72 72 65 6e 74 |Delta < |(current|
|00002800| 4f 66 66 73 65 74 20 2d | 20 6d 61 78 4f 66 66 73 |Offset -| maxOffs|
|00002810| 65 74 29 29 0d 09 09 09 | 7b 0d 09 09 09 09 76 44 |et))....|{.....vD|
|00002820| 65 6c 74 61 20 3d 20 63 | 75 72 72 65 6e 74 4f 66 |elta = c|urrentOf|
|00002830| 66 73 65 74 20 2d 20 6d | 61 78 4f 66 66 73 65 74 |fset - m|axOffset|
|00002840| 3b 0d 09 09 09 7d 0d 0d | 09 09 09 2f 2f 20 6e 65 |;....}..|...// ne|
|00002850| 76 65 72 20 73 63 72 6f | 6c 6c 20 62 79 20 6d 6f |ver scro|ll by mo|
|00002860| 72 65 20 74 68 61 6e 20 | 6b 4d 61 78 53 63 72 6f |re than |kMaxScro|
|00002870| 6c 6c 44 65 6c 74 61 20 | 70 69 78 65 6c 73 0d 09 |llDelta |pixels..|
|00002880| 09 09 69 66 20 28 76 44 | 65 6c 74 61 20 3c 20 2d |..if (vD|elta < -|
|00002890| 6b 4d 61 78 53 63 72 6f | 6c 6c 44 65 6c 74 61 29 |kMaxScro|llDelta)|
|000028a0| 0d 09 09 09 7b 0d 09 09 | 09 09 76 44 65 6c 74 61 |....{...|..vDelta|
|000028b0| 20 3d 20 2d 6b 4d 61 78 | 53 63 72 6f 6c 6c 44 65 | = -kMax|ScrollDe|
|000028c0| 6c 74 61 3b 0d 09 09 09 | 7d 0d 09 09 7d 0d 09 7d |lta;....|}...}..}|
|000028d0| 0d 0d 09 2f 2f 20 69 73 | 20 74 68 65 20 6d 6f 75 |...// is| the mou|
|000028e0| 73 65 20 61 62 6f 76 65 | 20 74 68 65 20 76 69 65 |se above| the vie|
|000028f0| 77 20 72 65 63 74 3f 0d | 09 65 6c 73 65 20 69 66 |w rect?.|.else if|
|00002900| 20 28 6d 6f 75 73 65 4c | 6f 63 2e 76 20 3c 20 70 | (mouseL|oc.v < p|
|00002910| 57 45 2d 3e 76 69 65 77 | 52 65 63 74 2e 74 6f 70 |WE->view|Rect.top|
|00002920| 29 0d 09 7b 0d 09 09 2f | 2f 20 69 73 20 74 68 65 |)..{.../|/ is the|
|00002930| 72 65 20 61 6e 79 74 68 | 69 6e 67 20 68 69 64 64 |re anyth|ing hidd|
|00002940| 65 6e 20 61 62 6f 76 65 | 20 74 68 65 20 76 69 65 |en above| the vie|
|00002950| 77 20 72 65 63 74 3f 0d | 09 09 69 66 20 28 63 75 |w rect?.|..if (cu|
|00002960| 72 72 65 6e 74 4f 66 66 | 73 65 74 20 3e 20 30 29 |rrentOff|set > 0)|
|00002970| 0d 09 09 7b 0d 09 09 09 | 2f 2f 20 74 68 65 6e 20 |...{....|// then |
|00002980| 73 63 72 6f 6c 6c 20 75 | 70 3a 20 63 61 6c 63 75 |scroll u|p: calcu|
|00002990| 6c 61 74 65 20 74 68 65 | 20 73 63 72 6f 6c 6c 20 |late the| scroll |
|000029a0| 64 65 6c 74 61 0d 09 09 | 09 76 44 65 6c 74 61 20 |delta...|.vDelta |
|000029b0| 3d 20 70 57 45 2d 3e 76 | 69 65 77 52 65 63 74 2e |= pWE->v|iewRect.|
|000029c0| 74 6f 70 20 2d 20 6d 6f | 75 73 65 4c 6f 63 2e 76 |top - mo|useLoc.v|
|000029d0| 3b 0d 0d 09 09 09 2f 2f | 20 70 69 6e 20 74 68 65 |;.....//| pin the|
|000029e0| 20 6e 65 77 20 76 65 72 | 74 69 63 61 6c 20 6f 66 | new ver|tical of|
|000029f0| 66 73 65 74 20 74 6f 20 | 74 68 65 20 74 6f 70 20 |fset to |the top |
|00002a00| 6f 66 20 74 68 65 20 64 | 65 73 74 20 72 65 63 74 |of the d|est rect|
|00002a10| 61 6e 67 6c 65 0d 09 09 | 09 69 66 20 28 76 44 65 |angle...|.if (vDe|
|00002a20| 6c 74 61 20 3e 20 63 75 | 72 72 65 6e 74 4f 66 66 |lta > cu|rrentOff|
|00002a30| 73 65 74 29 0d 09 09 09 | 7b 0d 09 09 09 09 76 44 |set)....|{.....vD|
|00002a40| 65 6c 74 61 20 3d 20 63 | 75 72 72 65 6e 74 4f 66 |elta = c|urrentOf|
|00002a50| 66 73 65 74 3b 0d 09 09 | 09 7d 0d 0d 09 09 09 2f |fset;...|.}...../|
|00002a60| 2f 20 6e 65 76 65 72 20 | 73 63 72 6f 6c 6c 20 62 |/ never |scroll b|
|00002a70| 79 20 6d 6f 72 65 20 74 | 68 61 6e 20 6b 4d 61 78 |y more t|han kMax|
|00002a80| 53 63 72 6f 6c 6c 44 65 | 6c 74 61 20 70 69 78 65 |ScrollDe|lta pixe|
|00002a90| 6c 73 0d 09 09 09 69 66 | 20 28 76 44 65 6c 74 61 |ls....if| (vDelta|
|00002aa0| 20 3e 20 6b 4d 61 78 53 | 63 72 6f 6c 6c 44 65 6c | > kMaxS|crollDel|
|00002ab0| 74 61 29 0d 09 09 09 7b | 0d 09 09 09 09 76 44 65 |ta)....{|.....vDe|
|00002ac0| 6c 74 61 20 3d 20 6b 4d | 61 78 53 63 72 6f 6c 6c |lta = kM|axScroll|
|00002ad0| 44 65 6c 74 61 3b 0d 09 | 09 09 7d 0d 09 09 7d 0d |Delta;..|..}...}.|
|00002ae0| 09 7d 0d 0d 09 2f 2f 20 | 48 41 4e 44 4c 45 20 48 |.}...// |HANDLE H|
|00002af0| 4f 52 49 5a 4f 4e 54 41 | 4c 20 41 55 54 4f 53 43 |ORIZONTA|L AUTOSC|
|00002b00| 52 4f 4c 4c 0d 09 63 75 | 72 72 65 6e 74 4f 66 66 |ROLL..cu|rrentOff|
|00002b10| 73 65 74 20 3d 20 70 57 | 45 2d 3e 76 69 65 77 52 |set = pW|E->viewR|
|00002b20| 65 63 74 2e 6c 65 66 74 | 20 2d 20 70 57 45 2d 3e |ect.left| - pWE->|
|00002b30| 64 65 73 74 52 65 63 74 | 2e 6c 65 66 74 3b 0d 09 |destRect|.left;..|
|00002b40| 6d 61 78 4f 66 66 73 65 | 74 20 3d 20 28 70 57 45 |maxOffse|t = (pWE|
|00002b50| 2d 3e 64 65 73 74 52 65 | 63 74 2e 72 69 67 68 74 |->destRe|ct.right|
|00002b60| 20 2d 20 70 57 45 2d 3e | 64 65 73 74 52 65 63 74 | - pWE->|destRect|
|00002b70| 2e 6c 65 66 74 29 20 2d | 20 28 70 57 45 2d 3e 76 |.left) -| (pWE->v|
|00002b80| 69 65 77 52 65 63 74 2e | 72 69 67 68 74 20 2d 20 |iewRect.|right - |
|00002b90| 70 57 45 2d 3e 76 69 65 | 77 52 65 63 74 2e 6c 65 |pWE->vie|wRect.le|
|00002ba0| 66 74 29 3b 0d 0d 09 2f | 2f 20 69 73 20 74 68 65 |ft);.../|/ is the|
|00002bb0| 20 6d 6f 75 73 65 20 74 | 6f 20 74 68 65 20 72 69 | mouse t|o the ri|
|00002bc0| 67 68 74 20 6f 66 20 74 | 68 65 20 76 69 65 77 20 |ght of t|he view |
|00002bd0| 72 65 63 74 3f 0d 09 69 | 66 20 28 6d 6f 75 73 65 |rect?..i|f (mouse|
|00002be0| 4c 6f 63 2e 68 20 3e 20 | 70 57 45 2d 3e 76 69 65 |Loc.h > |pWE->vie|
|00002bf0| 77 52 65 63 74 2e 72 69 | 67 68 74 29 0d 09 7b 0d |wRect.ri|ght)..{.|
|00002c00| 09 09 2f 2f 20 69 73 20 | 74 68 65 72 65 20 61 6e |..// is |there an|
|00002c10| 79 74 68 69 6e 67 20 68 | 69 64 64 65 6e 20 74 6f |ything h|idden to|
|00002c20| 20 74 68 65 20 72 69 67 | 68 74 20 6f 66 20 74 68 | the rig|ht of th|
|00002c30| 65 20 76 69 65 77 20 72 | 65 63 74 3f 0d 09 09 69 |e view r|ect?...i|
|00002c40| 66 20 28 63 75 72 72 65 | 6e 74 4f 66 66 73 65 74 |f (curre|ntOffset|
|00002c50| 20 3c 20 6d 61 78 4f 66 | 66 73 65 74 29 0d 09 09 | < maxOf|fset)...|
|00002c60| 7b 0d 09 09 09 2f 2f 20 | 74 68 65 6e 20 73 63 72 |{....// |then scr|
|00002c70| 6f 6c 6c 20 72 69 67 68 | 74 3a 20 63 61 6c 63 75 |oll righ|t: calcu|
|00002c80| 6c 61 74 65 20 74 68 65 | 20 73 63 72 6f 6c 6c 20 |late the| scroll |
|00002c90| 64 65 6c 74 61 0d 09 09 | 09 68 44 65 6c 74 61 20 |delta...|.hDelta |
|00002ca0| 3d 20 70 57 45 2d 3e 76 | 69 65 77 52 65 63 74 2e |= pWE->v|iewRect.|
|00002cb0| 72 69 67 68 74 20 2d 20 | 6d 6f 75 73 65 4c 6f 63 |right - |mouseLoc|
|00002cc0| 2e 68 3b 0d 0d 09 09 09 | 2f 2f 20 70 69 6e 20 74 |.h;.....|// pin t|
|00002cd0| 68 65 20 6e 65 77 20 76 | 65 72 74 69 63 61 6c 20 |he new v|ertical |
|00002ce0| 6f 66 66 73 65 74 20 74 | 6f 20 74 68 65 20 72 69 |offset t|o the ri|
|00002cf0| 67 68 74 6d 6f 73 74 20 | 65 64 67 65 0d 09 09 09 |ghtmost |edge....|
|00002d00| 2f 2f 20 6f 66 20 74 68 | 65 20 64 65 73 74 20 72 |// of th|e dest r|
|00002d10| 65 63 74 61 6e 67 6c 65 | 0d 09 09 09 69 66 20 28 |ectangle|....if (|
|00002d20| 68 44 65 6c 74 61 20 3c | 20 28 63 75 72 72 65 6e |hDelta <| (curren|
|00002d30| 74 4f 66 66 73 65 74 20 | 2d 20 6d 61 78 4f 66 66 |tOffset |- maxOff|
|00002d40| 73 65 74 29 29 0d 09 09 | 09 7b 0d 09 09 09 09 68 |set))...|.{.....h|
|00002d50| 44 65 6c 74 61 20 3d 20 | 63 75 72 72 65 6e 74 4f |Delta = |currentO|
|00002d60| 66 66 73 65 74 20 2d 20 | 6d 61 78 4f 66 66 73 65 |ffset - |maxOffse|
|00002d70| 74 3b 0d 09 09 09 7d 0d | 0d 09 09 09 2f 2f 20 6e |t;....}.|....// n|
|00002d80| 65 76 65 72 20 73 63 72 | 6f 6c 6c 20 62 79 20 6d |ever scr|oll by m|
|00002d90| 6f 72 65 20 74 68 61 6e | 20 6b 4d 61 78 53 63 72 |ore than| kMaxScr|
|00002da0| 6f 6c 6c 44 65 6c 74 61 | 20 70 69 78 65 6c 73 0d |ollDelta| pixels.|
|00002db0| 09 09 09 69 66 20 28 68 | 44 65 6c 74 61 20 3c 20 |...if (h|Delta < |
|00002dc0| 2d 6b 4d 61 78 53 63 72 | 6f 6c 6c 44 65 6c 74 61 |-kMaxScr|ollDelta|
|00002dd0| 29 0d 09 09 09 7b 0d 09 | 09 09 09 68 44 65 6c 74 |)....{..|...hDelt|
|00002de0| 61 20 3d 20 2d 6b 4d 61 | 78 53 63 72 6f 6c 6c 44 |a = -kMa|xScrollD|
|00002df0| 65 6c 74 61 3b 0d 09 09 | 09 7d 0d 09 09 7d 0d 09 |elta;...|.}...}..|
|00002e00| 7d 0d 0d 09 2f 2f 20 69 | 73 20 74 68 65 20 6d 6f |}...// i|s the mo|
|00002e10| 75 73 65 20 74 6f 20 74 | 68 65 20 6c 65 66 74 20 |use to t|he left |
|00002e20| 6f 66 20 74 68 65 20 76 | 69 65 77 20 72 65 63 74 |of the v|iew rect|
|00002e30| 3f 0d 09 65 6c 73 65 20 | 69 66 20 28 6d 6f 75 73 |?..else |if (mous|
|00002e40| 65 4c 6f 63 2e 68 20 3c | 20 70 57 45 2d 3e 76 69 |eLoc.h <| pWE->vi|
|00002e50| 65 77 52 65 63 74 2e 6c | 65 66 74 29 0d 09 7b 0d |ewRect.l|eft)..{.|
|00002e60| 09 09 2f 2f 20 69 73 20 | 74 68 65 72 65 20 61 6e |..// is |there an|
|00002e70| 79 74 68 69 6e 67 20 68 | 69 64 64 65 6e 20 74 6f |ything h|idden to|
|00002e80| 20 74 68 65 20 6c 65 66 | 74 20 6f 66 20 74 68 65 | the lef|t of the|
|00002e90| 20 76 69 65 77 20 72 65 | 63 74 3f 0d 09 09 69 66 | view re|ct?...if|
|00002ea0| 20 28 63 75 72 72 65 6e | 74 4f 66 66 73 65 74 20 | (curren|tOffset |
|00002eb0| 3e 20 30 29 0d 09 09 7b | 0d 09 09 09 2f 2f 20 74 |> 0)...{|....// t|
|00002ec0| 68 65 6e 20 73 63 72 6f | 6c 6c 20 75 70 3a 20 63 |hen scro|ll up: c|
|00002ed0| 61 6c 63 75 6c 61 74 65 | 20 74 68 65 20 73 63 72 |alculate| the scr|
|00002ee0| 6f 6c 6c 20 64 65 6c 74 | 61 0d 09 09 09 68 44 65 |oll delt|a....hDe|
|00002ef0| 6c 74 61 20 3d 20 70 57 | 45 2d 3e 76 69 65 77 52 |lta = pW|E->viewR|
|00002f00| 65 63 74 2e 6c 65 66 74 | 20 2d 20 6d 6f 75 73 65 |ect.left| - mouse|
|00002f10| 4c 6f 63 2e 68 3b 0d 0d | 09 09 09 2f 2f 20 70 69 |Loc.h;..|...// pi|
|00002f20| 6e 20 74 68 65 20 6e 65 | 77 20 68 6f 72 69 7a 6f |n the ne|w horizo|
|00002f30| 6e 74 61 6c 20 6f 66 66 | 73 65 74 20 74 6f 20 74 |ntal off|set to t|
|00002f40| 68 65 20 6c 65 66 74 6d | 6f 73 74 20 65 64 67 65 |he leftm|ost edge|
|00002f50| 0d 09 09 09 2f 2f 20 6f | 66 20 74 68 65 20 64 65 |....// o|f the de|
|00002f60| 73 74 20 72 65 63 74 61 | 6e 67 6c 65 0d 09 09 09 |st recta|ngle....|
|00002f70| 69 66 20 28 68 44 65 6c | 74 61 20 3e 20 63 75 72 |if (hDel|ta > cur|
|00002f80| 72 65 6e 74 4f 66 66 73 | 65 74 29 0d 09 09 09 7b |rentOffs|et)....{|
|00002f90| 0d 09 09 09 09 68 44 65 | 6c 74 61 20 3d 20 63 75 |.....hDe|lta = cu|
|00002fa0| 72 72 65 6e 74 4f 66 66 | 73 65 74 3b 0d 09 09 09 |rrentOff|set;....|
|00002fb0| 7d 0d 0d 09 09 09 2f 2f | 20 6e 65 76 65 72 20 73 |}.....//| never s|
|00002fc0| 63 72 6f 6c 6c 20 62 79 | 20 6d 6f 72 65 20 74 68 |croll by| more th|
|00002fd0| 61 6e 20 6b 4d 61 78 53 | 63 72 6f 6c 6c 44 65 6c |an kMaxS|crollDel|
|00002fe0| 74 61 20 70 69 78 65 6c | 73 0d 09 09 09 69 66 20 |ta pixel|s....if |
|00002ff0| 28 68 44 65 6c 74 61 20 | 3e 20 6b 4d 61 78 53 63 |(hDelta |> kMaxSc|
|00003000| 72 6f 6c 6c 44 65 6c 74 | 61 29 0d 09 09 09 7b 0d |rollDelt|a)....{.|
|00003010| 09 09 09 09 68 44 65 6c | 74 61 20 3d 20 6b 4d 61 |....hDel|ta = kMa|
|00003020| 78 53 63 72 6f 6c 6c 44 | 65 6c 74 61 3b 0d 09 09 |xScrollD|elta;...|
|00003030| 09 7d 0d 09 09 7d 0d 09 | 7d 0d 0d 09 69 66 20 28 |.}...}..|}...if (|
|00003040| 28 76 44 65 6c 74 61 20 | 21 3d 20 30 29 20 7c 7c |(vDelta |!= 0) |||
|00003050| 20 28 68 44 65 6c 74 61 | 20 21 3d 20 30 29 29 0d | (hDelta| != 0)).|
|00003060| 09 7b 0d 09 09 2f 2f 20 | 64 6f 20 74 68 65 20 73 |.{...// |do the s|
|00003070| 63 72 6f 6c 6c 0d 09 09 | 57 45 53 63 72 6f 6c 6c |croll...|WEScroll|
|00003080| 28 68 44 65 6c 74 61 2c | 20 76 44 65 6c 74 61 2c |(hDelta,| vDelta,|
|00003090| 20 68 57 45 29 3b 0d 0d | 09 09 2f 2f 20 6e 6f 74 | hWE);..|..// not|
|000030a0| 69 66 79 20 6f 75 72 20 | 63 6c 69 65 6e 74 20 77 |ify our |client w|
|000030b0| 65 20 68 61 76 65 20 73 | 63 72 6f 6c 6c 65 64 20 |e have s|crolled |
|000030c0| 74 68 65 20 74 65 78 74 | 0d 09 09 69 66 20 28 70 |the text|...if (p|
|000030d0| 57 45 2d 3e 73 63 72 6f | 6c 6c 50 72 6f 63 20 21 |WE->scro|llProc !|
|000030e0| 3d 20 6e 69 6c 29 0d 09 | 09 7b 0d 09 09 09 43 61 |= nil)..|.{....Ca|
|000030f0| 6c 6c 57 45 53 63 72 6f | 6c 6c 50 72 6f 63 28 68 |llWEScro|llProc(h|
|00003100| 57 45 2c 20 70 57 45 2d | 3e 73 63 72 6f 6c 6c 50 |WE, pWE-|>scrollP|
|00003110| 72 6f 63 29 3b 0d 09 09 | 7d 0d 09 7d 0d 0d 09 72 |roc);...|}..}...r|
|00003120| 65 74 75 72 6e 20 74 72 | 75 65 3b 0d 7d 0d 0d 23 |eturn tr|ue;.}..#|
|00003130| 69 66 20 57 41 53 54 45 | 5f 44 52 41 47 5f 41 4e |if WASTE|_DRAG_AN|
|00003140| 44 5f 44 52 4f 50 0d 73 | 74 61 74 69 63 20 70 61 |D_DROP.s|tatic pa|
|00003150| 73 63 61 6c 20 4f 53 45 | 72 72 20 5f 57 45 53 74 |scal OSE|rr _WESt|
|00003160| 64 48 69 6c 69 74 65 44 | 72 6f 70 41 72 65 61 28 |dHiliteD|ropArea(|
|00003170| 44 72 61 67 52 65 66 65 | 72 65 6e 63 65 20 64 72 |DragRefe|rence dr|
|00003180| 61 67 2c 20 42 6f 6f 6c | 65 61 6e 20 68 69 6c 69 |ag, Bool|ean hili|
|00003190| 74 65 46 6c 61 67 2c 20 | 57 45 48 61 6e 64 6c 65 |teFlag, |WEHandle|
|000031a0| 20 68 57 45 29 0d 7b 0d | 09 57 45 50 74 72 20 70 | hWE).{.|.WEPtr p|
|000031b0| 57 45 20 3d 20 2a 68 57 | 45 3b 09 09 2f 2f 20 61 |WE = *hW|E;..// a|
|000031c0| 73 73 75 6d 65 20 57 45 | 20 72 65 63 6f 72 64 20 |ssume WE| record |
|000031d0| 69 73 20 61 6c 72 65 61 | 64 79 20 6c 6f 63 6b 65 |is alrea|dy locke|
|000031e0| 64 0d 09 52 67 6e 48 61 | 6e 64 6c 65 20 74 6d 70 |d..RgnHa|ndle tmp|
|000031f0| 52 67 6e 3b 0d 09 4f 53 | 45 72 72 20 65 72 72 3b |Rgn;..OS|Err err;|
|00003200| 0d 0d 09 69 66 20 28 68 | 69 6c 69 74 65 46 6c 61 |...if (h|iliteFla|
|00003210| 67 29 0d 09 7b 0d 09 09 | 74 6d 70 52 67 6e 20 3d |g)..{...|tmpRgn =|
|00003220| 20 4e 65 77 52 67 6e 28 | 29 3b 0d 09 09 43 6f 70 | NewRgn(|);...Cop|
|00003230| 79 52 67 6e 28 70 57 45 | 2d 3e 76 69 65 77 52 67 |yRgn(pWE|->viewRg|
|00003240| 6e 2c 20 74 6d 70 52 67 | 6e 29 3b 0d 09 09 49 6e |n, tmpRg|n);...In|
|00003250| 73 65 74 52 67 6e 28 74 | 6d 70 52 67 6e 2c 20 2d |setRgn(t|mpRgn, -|
|00003260| 6b 54 65 78 74 4d 61 72 | 67 69 6e 2c 20 2d 6b 54 |kTextMar|gin, -kT|
|00003270| 65 78 74 4d 61 72 67 69 | 6e 29 3b 0d 09 09 65 72 |extMargi|n);...er|
|00003280| 72 20 3d 20 53 68 6f 77 | 44 72 61 67 48 69 6c 69 |r = Show|DragHili|
|00003290| 74 65 28 64 72 61 67 2c | 20 74 6d 70 52 67 6e 2c |te(drag,| tmpRgn,|
|000032a0| 20 74 72 75 65 29 3b 0d | 09 09 44 69 73 70 6f 73 | true);.|..Dispos|
|000032b0| 65 52 67 6e 28 74 6d 70 | 52 67 6e 29 3b 0d 09 7d |eRgn(tmp|Rgn);..}|
|000032c0| 0d 09 65 6c 73 65 0d 09 | 7b 0d 09 09 65 72 72 20 |..else..|{...err |
|000032d0| 3d 20 48 69 64 65 44 72 | 61 67 48 69 6c 69 74 65 |= HideDr|agHilite|
|000032e0| 28 64 72 61 67 29 3b 0d | 09 7d 0d 09 72 65 74 75 |(drag);.|.}..retu|
|000032f0| 72 6e 20 65 72 72 3b 0d | 7d 0d 23 65 6e 64 69 66 |rn err;.|}.#endif|
|00003300| 09 2f 2f 20 57 41 53 54 | 45 5f 44 52 41 47 5f 41 |.// WAST|E_DRAG_A|
|00003310| 4e 44 5f 44 52 4f 50 0d | 0d 73 74 61 74 69 63 20 |ND_DROP.|.static |
|00003320| 70 61 73 63 61 6c 20 76 | 6f 69 64 20 5f 57 45 53 |pascal v|oid _WES|
|00003330| 74 64 45 72 61 73 65 28 | 63 6f 6e 73 74 20 52 65 |tdErase(|const Re|
|00003340| 63 74 20 2a 61 72 65 61 | 2c 20 57 45 48 61 6e 64 |ct *area|, WEHand|
|00003350| 6c 65 20 68 57 45 29 0d | 7b 0d 23 70 72 61 67 6d |le hWE).|{.#pragm|
|00003360| 61 20 75 6e 75 73 65 64 | 28 68 57 45 29 0d 09 45 |a unused|(hWE)..E|
|00003370| 72 61 73 65 52 65 63 74 | 28 61 72 65 61 29 3b 0d |raseRect|(area);.|
|00003380| 7d 0d 0d 23 69 66 20 57 | 41 53 54 45 5f 54 53 4d |}..#if W|ASTE_TSM|
|00003390| 5f 53 55 50 50 4f 52 54 | 0d 70 61 73 63 61 6c 20 |_SUPPORT|.pascal |
|000033a0| 4f 53 45 72 72 20 5f 57 | 45 52 65 67 69 73 74 65 |OSErr _W|ERegiste|
|000033b0| 72 57 69 74 68 54 53 4d | 28 57 45 48 61 6e 64 6c |rWithTSM|(WEHandl|
|000033c0| 65 20 68 57 45 29 0d 7b | 0d 09 57 45 50 74 72 20 |e hWE).{|..WEPtr |
|000033d0| 70 57 45 20 3d 20 2a 68 | 57 45 3b 09 2f 2f 20 61 |pWE = *h|WE;.// a|
|000033e0| 73 73 75 6d 65 20 57 45 | 20 72 65 63 6f 72 64 20 |ssume WE| record |
|000033f0| 69 73 20 61 6c 72 65 61 | 64 79 20 6c 6f 63 6b 65 |is alrea|dy locke|
|00003400| 64 0d 09 49 6e 74 65 72 | 66 61 63 65 54 79 70 65 |d..Inter|faceType|
|00003410| 4c 69 73 74 20 74 79 70 | 65 4c 69 73 74 3b 0d 09 |List typ|eList;..|
|00003420| 4f 53 45 72 72 20 65 72 | 72 3b 0d 0d 09 2f 2f 20 |OSErr er|r;...// |
|00003430| 64 6f 20 6e 6f 74 68 69 | 6e 67 20 69 66 20 74 68 |do nothi|ng if th|
|00003440| 65 20 54 65 78 74 20 53 | 65 72 76 69 63 65 73 20 |e Text S|ervices |
|00003450| 4d 61 6e 61 67 65 72 20 | 69 73 6e 27 74 20 61 76 |Manager |isn't av|
|00003460| 61 69 6c 61 62 6c 65 0d | 09 69 66 20 28 42 54 53 |ailable.|.if (BTS|
|00003470| 54 28 70 57 45 2d 3e 66 | 6c 61 67 73 2c 20 77 65 |T(pWE->f|lags, we|
|00003480| 46 48 61 73 54 65 78 74 | 53 65 72 76 69 63 65 73 |FHasText|Services|
|00003490| 29 29 0d 09 7b 0d 09 09 | 74 79 70 65 4c 69 73 74 |))..{...|typeList|
|000034a0| 5b 30 5d 20 3d 20 6b 54 | 65 78 74 53 65 72 76 69 |[0] = kT|extServi|
|000034b0| 63 65 3b 0d 09 09 69 66 | 20 28 28 65 72 72 20 3d |ce;...if| ((err =|
|000034c0| 20 4e 65 77 54 53 4d 44 | 6f 63 75 6d 65 6e 74 28 | NewTSMD|ocument(|
|000034d0| 31 2c 20 74 79 70 65 4c | 69 73 74 2c 20 26 70 57 |1, typeL|ist, &pW|
|000034e0| 45 2d 3e 74 73 6d 52 65 | 66 65 72 65 6e 63 65 2c |E->tsmRe|ference,|
|000034f0| 20 28 53 49 6e 74 33 32 | 29 20 68 57 45 29 29 20 | (SInt32|) hWE)) |
|00003500| 21 3d 20 6e 6f 45 72 72 | 29 0d 09 09 7b 0d 09 09 |!= noErr|)...{...|
|00003510| 09 2f 2f 20 77 65 20 64 | 6f 6e 27 74 20 63 6f 6e |.// we d|on't con|
|00003520| 73 69 64 65 72 20 69 74 | 20 61 6e 20 65 72 72 6f |sider it| an erro|
|00003530| 72 20 69 66 20 6f 75 72 | 20 63 6c 69 65 6e 74 20 |r if our| client |
|00003540| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 69 73 6e 27 |applicat|ion isn'|
|00003550| 74 20 54 53 4d 2d 61 77 | 61 72 65 0d 09 09 09 69 |t TSM-aw|are....i|
|00003560| 66 20 28 65 72 72 20 21 | 3d 20 74 73 6d 4e 65 76 |f (err !|= tsmNev|
|00003570| 65 72 52 65 67 69 73 74 | 65 72 65 64 45 72 72 29 |erRegist|eredErr)|
|00003580| 0d 09 09 09 7b 0d 09 09 | 09 09 67 6f 74 6f 20 63 |....{...|..goto c|
|00003590| 6c 65 61 6e 75 70 3b 0d | 09 09 09 7d 0d 09 09 7d |leanup;.|...}...}|
|000035a0| 0d 09 7d 0d 0d 09 2f 2f | 20 63 6c 65 61 72 20 72 |..}...//| clear r|
|000035b0| 65 73 75 6c 74 20 63 6f | 64 65 0d 09 65 72 72 20 |esult co|de..err |
|000035c0| 3d 20 6e 6f 45 72 72 3b | 0d 0d 63 6c 65 61 6e 75 |= noErr;|..cleanu|
|000035d0| 70 3a 0d 09 2f 2f 20 72 | 65 74 75 72 6e 20 72 65 |p:..// r|eturn re|
|000035e0| 73 75 6c 74 20 63 6f 64 | 65 0d 09 72 65 74 75 72 |sult cod|e..retur|
|000035f0| 6e 20 65 72 72 3b 0d 7d | 0d 23 65 6e 64 69 66 0d |n err;.}|.#endif.|
|00003600| 0d 70 61 73 63 61 6c 20 | 76 6f 69 64 20 5f 57 45 |.pascal |void _WE|
|00003610| 53 65 74 53 74 61 6e 64 | 61 72 64 48 6f 6f 6b 73 |SetStand|ardHooks|
|00003620| 28 57 45 48 61 6e 64 6c | 65 20 68 57 45 29 0d 7b |(WEHandl|e hWE).{|
|00003630| 0d 09 57 45 50 74 72 20 | 70 57 45 3b 0d 0d 09 2f |..WEPtr |pWE;.../|
|00003640| 2f 20 74 68 65 20 66 69 | 72 73 74 20 74 69 6d 65 |/ the fi|rst time|
|00003650| 20 77 65 27 72 65 20 63 | 61 6c 6c 65 64 2c 20 63 | we're c|alled, c|
|00003660| 72 65 61 74 65 20 72 6f | 75 74 69 6e 65 20 64 65 |reate ro|utine de|
|00003670| 73 63 72 69 70 74 6f 72 | 73 0d 09 69 66 20 28 5f |scriptor|s..if (_|
|00003680| 77 65 53 74 64 44 72 61 | 77 54 65 78 74 50 72 6f |weStdDra|wTextPro|
|00003690| 63 20 3d 3d 20 6e 69 6c | 29 0d 09 7b 0d 09 09 5f |c == nil|)..{..._|
|000036a0| 77 65 53 74 64 44 72 61 | 77 54 65 78 74 50 72 6f |weStdDra|wTextPro|
|000036b0| 63 20 3d 20 4e 65 77 57 | 45 44 72 61 77 54 65 78 |c = NewW|EDrawTex|
|000036c0| 74 50 72 6f 63 28 5f 57 | 45 53 74 64 44 72 61 77 |tProc(_W|EStdDraw|
|000036d0| 54 65 78 74 29 3b 0d 09 | 09 5f 77 65 53 74 64 50 |Text);..|._weStdP|
|000036e0| 69 78 65 6c 54 6f 43 68 | 61 72 50 72 6f 63 20 3d |ixelToCh|arProc =|
|000036f0| 20 4e 65 77 57 45 50 69 | 78 65 6c 54 6f 43 68 61 | NewWEPi|xelToCha|
|00003700| 72 50 72 6f 63 28 5f 57 | 45 53 74 64 50 69 78 65 |rProc(_W|EStdPixe|
|00003710| 6c 54 6f 43 68 61 72 29 | 3b 0d 09 09 5f 77 65 53 |lToChar)|;..._weS|
|00003720| 74 64 43 68 61 72 54 6f | 50 69 78 65 6c 50 72 6f |tdCharTo|PixelPro|
|00003730| 63 20 3d 20 4e 65 77 57 | 45 43 68 61 72 54 6f 50 |c = NewW|ECharToP|
|00003740| 69 78 65 6c 50 72 6f 63 | 28 5f 57 45 53 74 64 43 |ixelProc|(_WEStdC|
|00003750| 68 61 72 54 6f 50 69 78 | 65 6c 29 3b 0d 0d 09 09 |harToPix|el);....|
|00003760| 69 66 20 28 47 65 74 53 | 63 72 69 70 74 4d 61 6e |if (GetS|criptMan|
|00003770| 61 67 65 72 56 61 72 69 | 61 62 6c 65 28 73 6d 45 |agerVari|able(smE|
|00003780| 6e 61 62 6c 65 64 29 20 | 3e 20 31 29 0d 09 09 7b |nabled) |> 1)...{|
|00003790| 0d 09 09 09 2f 2f 09 6f | 6e 65 20 6f 72 20 6d 6f |....//.o|ne or mo|
|000037a0| 72 65 20 6e 6f 6e 2d 52 | 6f 6d 61 6e 20 73 63 72 |re non-R|oman scr|
|000037b0| 69 70 74 73 20 69 6e 73 | 74 61 6c 6c 65 64 3a 20 |ipts ins|talled: |
|000037c0| 75 73 65 20 57 6f 72 6c | 64 53 63 72 69 70 74 20 |use Worl|dScript |
|000037d0| 72 6f 75 74 69 6e 65 0d | 09 09 09 5f 77 65 53 74 |routine.|..._weSt|
|000037e0| 64 4c 69 6e 65 42 72 65 | 61 6b 50 72 6f 63 20 3d |dLineBre|akProc =|
|000037f0| 20 4e 65 77 57 45 4c 69 | 6e 65 42 72 65 61 6b 50 | NewWELi|neBreakP|
|00003800| 72 6f 63 28 5f 57 45 53 | 74 64 4c 69 6e 65 42 72 |roc(_WES|tdLineBr|
|00003810| 65 61 6b 29 3b 0d 09 09 | 7d 0d 09 09 65 6c 73 65 |eak);...|}...else|
|00003820| 0d 09 09 7b 0d 09 09 09 | 2f 2f 09 52 6f 6d 61 6e |...{....|//.Roman|
|00003830| 2d 6f 6e 6c 79 20 63 61 | 73 65 3a 20 75 73 65 20 |-only ca|se: use |
|00003840| 6f 75 72 20 6f 77 6e 20 | 54 65 78 74 45 64 69 74 |our own |TextEdit|
|00003850| 2d 6c 69 6b 65 20 6c 69 | 6e 65 20 62 72 65 61 6b |-like li|ne break|
|00003860| 69 6e 67 20 72 6f 75 74 | 69 6e 65 0d 09 09 09 5f |ing rout|ine...._|
|00003870| 77 65 53 74 64 4c 69 6e | 65 42 72 65 61 6b 50 72 |weStdLin|eBreakPr|
|00003880| 6f 63 20 3d 20 4e 65 77 | 57 45 4c 69 6e 65 42 72 |oc = New|WELineBr|
|00003890| 65 61 6b 50 72 6f 63 28 | 5f 57 45 52 6f 6d 61 6e |eakProc(|_WERoman|
|000038a0| 4c 69 6e 65 42 72 65 61 | 6b 29 3b 0d 09 09 7d 0d |LineBrea|k);...}.|
|000038b0| 0d 23 69 66 20 21 20 28 | 53 79 73 74 65 6d 53 65 |.#if ! (|SystemSe|
|000038c0| 76 65 6e 46 69 76 65 4f | 72 4c 61 74 65 72 20 7c |venFiveO|rLater ||
|000038d0| 7c 20 54 41 52 47 45 54 | 5f 52 54 5f 4d 41 43 5f || TARGET|_RT_MAC_|
|000038e0| 43 46 4d 29 0d 0d 09 09 | 69 66 20 28 47 65 74 53 |CFM)....|if (GetS|
|000038f0| 63 72 69 70 74 4d 61 6e | 61 67 65 72 56 61 72 69 |criptMan|agerVari|
|00003900| 61 62 6c 65 28 73 6d 56 | 65 72 73 69 6f 6e 29 20 |able(smV|ersion) |
|00003910| 3c 20 30 78 30 37 31 30 | 29 0d 09 09 7b 0d 09 09 |< 0x0710|)...{...|
|00003920| 09 2f 2f 20 70 72 65 2d | 37 2e 31 20 76 65 72 73 |.// pre-|7.1 vers|
|00003930| 69 6f 6e 20 6f 66 20 74 | 68 65 20 53 63 72 69 70 |ion of t|he Scrip|
|00003940| 74 20 4d 61 6e 61 67 65 | 72 3a 20 6d 75 73 74 20 |t Manage|r: must |
|00003950| 75 73 65 20 6f 6c 64 20 | 68 6f 6f 6b 73 0d 09 09 |use old |hooks...|
|00003960| 09 5f 77 65 53 74 64 57 | 6f 72 64 42 72 65 61 6b |._weStdW|ordBreak|
|00003970| 50 72 6f 63 20 3d 20 4e | 65 77 57 45 57 6f 72 64 |Proc = N|ewWEWord|
|00003980| 42 72 65 61 6b 50 72 6f | 63 28 5f 57 45 4f 6c 64 |BreakPro|c(_WEOld|
|00003990| 57 6f 72 64 42 72 65 61 | 6b 29 3b 0d 09 09 09 5f |WordBrea|k);...._|
|000039a0| 77 65 53 74 64 43 68 61 | 72 42 79 74 65 50 72 6f |weStdCha|rBytePro|
|000039b0| 63 20 3d 20 4e 65 77 57 | 45 43 68 61 72 42 79 74 |c = NewW|ECharByt|
|000039c0| 65 50 72 6f 63 28 5f 57 | 45 4f 6c 64 43 68 61 72 |eProc(_W|EOldChar|
|000039d0| 42 79 74 65 29 3b 0d 09 | 09 09 5f 77 65 53 74 64 |Byte);..|.._weStd|
|000039e0| 43 68 61 72 54 79 70 65 | 50 72 6f 63 20 3d 20 4e |CharType|Proc = N|
|000039f0| 65 77 57 45 43 68 61 72 | 54 79 70 65 50 72 6f 63 |ewWEChar|TypeProc|
|00003a00| 28 5f 57 45 4f 6c 64 43 | 68 61 72 54 79 70 65 29 |(_WEOldC|harType)|
|00003a10| 3b 0d 09 09 7d 0d 09 09 | 65 6c 73 65 0d 23 65 6e |;...}...|else.#en|
|00003a20| 64 69 66 0d 09 09 7b 0d | 09 09 09 2f 2f 20 53 63 |dif...{.|...// Sc|
|00003a30| 72 69 70 74 20 4d 61 6e | 61 67 65 72 20 76 65 72 |ript Man|ager ver|
|00003a40| 73 69 6f 6e 20 37 2e 31 | 20 6f 72 20 6e 65 77 65 |sion 7.1| or newe|
|00003a50| 72 0d 09 09 09 5f 77 65 | 53 74 64 57 6f 72 64 42 |r...._we|StdWordB|
|00003a60| 72 65 61 6b 50 72 6f 63 | 20 3d 20 4e 65 77 57 45 |reakProc| = NewWE|
|00003a70| 57 6f 72 64 42 72 65 61 | 6b 50 72 6f 63 28 5f 57 |WordBrea|kProc(_W|
|00003a80| 45 53 74 64 57 6f 72 64 | 42 72 65 61 6b 29 3b 0d |EStdWord|Break);.|
|00003a90| 09 09 09 5f 77 65 53 74 | 64 43 68 61 72 42 79 74 |..._weSt|dCharByt|
|00003aa0| 65 50 72 6f 63 20 3d 20 | 4e 65 77 57 45 43 68 61 |eProc = |NewWECha|
|00003ab0| 72 42 79 74 65 50 72 6f | 63 28 5f 57 45 53 74 64 |rBytePro|c(_WEStd|
|00003ac0| 43 68 61 72 42 79 74 65 | 29 3b 0d 09 09 09 5f 77 |CharByte|);...._w|
|00003ad0| 65 53 74 64 43 68 61 72 | 54 79 70 65 50 72 6f 63 |eStdChar|TypeProc|
|00003ae0| 20 3d 20 4e 65 77 57 45 | 43 68 61 72 54 79 70 65 | = NewWE|CharType|
|00003af0| 50 72 6f 63 28 5f 57 45 | 53 74 64 43 68 61 72 54 |Proc(_WE|StdCharT|
|00003b00| 79 70 65 29 3b 0d 09 09 | 7d 0d 0d 09 09 5f 77 65 |ype);...|}...._we|
|00003b10| 53 74 64 43 6c 69 63 6b | 4c 6f 6f 70 50 72 6f 63 |StdClick|LoopProc|
|00003b20| 20 3d 20 4e 65 77 57 45 | 43 6c 69 63 6b 4c 6f 6f | = NewWE|ClickLoo|
|00003b30| 70 50 72 6f 63 28 5f 57 | 45 53 74 64 43 6c 69 63 |pProc(_W|EStdClic|
|00003b40| 6b 4c 6f 6f 70 29 3b 0d | 23 69 66 20 57 41 53 54 |kLoop);.|#if WAST|
|00003b50| 45 5f 44 52 41 47 5f 41 | 4e 44 5f 44 52 4f 50 0d |E_DRAG_A|ND_DROP.|
|00003b60| 09 09 5f 77 65 53 74 64 | 48 69 6c 69 74 65 44 72 |.._weStd|HiliteDr|
|00003b70| 6f 70 41 72 65 61 50 72 | 6f 63 20 3d 20 4e 65 77 |opAreaPr|oc = New|
|00003b80| 57 45 48 69 6c 69 74 65 | 44 72 6f 70 41 72 65 61 |WEHilite|DropArea|
|00003b90| 50 72 6f 63 28 5f 57 45 | 53 74 64 48 69 6c 69 74 |Proc(_WE|StdHilit|
|00003ba0| 65 44 72 6f 70 41 72 65 | 61 29 3b 0d 23 65 6e 64 |eDropAre|a);.#end|
|00003bb0| 69 66 0d 09 09 5f 77 65 | 53 74 64 45 72 61 73 65 |if..._we|StdErase|
|00003bc0| 50 72 6f 63 20 3d 20 4e | 65 77 57 45 45 72 61 73 |Proc = N|ewWEEras|
|00003bd0| 65 50 72 6f 63 28 5f 57 | 45 53 74 64 45 72 61 73 |eProc(_W|EStdEras|
|00003be0| 65 29 3b 0d 0d 09 7d 20 | 2f 2f 20 69 66 20 63 61 |e);...} |// if ca|
|00003bf0| 6c 6c 65 64 20 66 6f 72 | 20 74 68 65 20 66 69 72 |lled for| the fir|
|00003c00| 73 74 20 74 69 6d 65 0d | 0d 09 2f 2f 20 72 65 70 |st time.|..// rep|
|00003c10| 6c 61 63 65 20 6e 75 6c | 6c 20 68 6f 6f 6b 20 66 |lace nul|l hook f|
|00003c20| 69 65 6c 64 73 20 77 69 | 74 68 20 74 68 65 20 61 |ields wi|th the a|
|00003c30| 64 64 72 65 73 73 65 73 | 20 6f 66 20 74 68 65 20 |ddresses| of the |
|00003c40| 73 74 61 6e 64 61 72 64 | 20 68 6f 6f 6b 73 0d 0d |standard| hooks..|
|00003c50| 09 70 57 45 20 3d 20 2a | 68 57 45 3b 0d 0d 09 69 |.pWE = *|hWE;...i|
|00003c60| 66 20 28 70 57 45 2d 3e | 64 72 61 77 54 65 78 74 |f (pWE->|drawText|
|00003c70| 48 6f 6f 6b 20 3d 3d 20 | 6e 69 6c 29 0d 09 7b 0d |Hook == |nil)..{.|
|00003c80| 09 09 70 57 45 2d 3e 64 | 72 61 77 54 65 78 74 48 |..pWE->d|rawTextH|
|00003c90| 6f 6f 6b 20 3d 20 5f 77 | 65 53 74 64 44 72 61 77 |ook = _w|eStdDraw|
|00003ca0| 54 65 78 74 50 72 6f 63 | 3b 0d 09 7d 0d 09 69 66 |TextProc|;..}..if|
|00003cb0| 20 28 70 57 45 2d 3e 70 | 69 78 65 6c 54 6f 43 68 | (pWE->p|ixelToCh|
|00003cc0| 61 72 48 6f 6f 6b 20 3d | 3d 20 6e 69 6c 29 0d 09 |arHook =|= nil)..|
|00003cd0| 7b 0d 09 09 70 57 45 2d | 3e 70 69 78 65 6c 54 6f |{...pWE-|>pixelTo|
|00003ce0| 43 68 61 72 48 6f 6f 6b | 20 3d 20 5f 77 65 53 74 |CharHook| = _weSt|
|00003cf0| 64 50 69 78 65 6c 54 6f | 43 68 61 72 50 72 6f 63 |dPixelTo|CharProc|
|00003d00| 3b 0d 09 7d 0d 09 69 66 | 20 28 70 57 45 2d 3e 63 |;..}..if| (pWE->c|
|00003d10| 68 61 72 54 6f 50 69 78 | 65 6c 48 6f 6f 6b 20 3d |harToPix|elHook =|
|00003d20| 3d 20 6e 69 6c 29 0d 09 | 7b 0d 09 09 70 57 45 2d |= nil)..|{...pWE-|
|00003d30| 3e 63 68 61 72 54 6f 50 | 69 78 65 6c 48 6f 6f 6b |>charToP|ixelHook|
|00003d40| 20 3d 20 5f 77 65 53 74 | 64 43 68 61 72 54 6f 50 | = _weSt|dCharToP|
|00003d50| 69 78 65 6c 50 72 6f 63 | 3b 0d 09 7d 0d 09 69 66 |ixelProc|;..}..if|
|00003d60| 20 28 70 57 45 2d 3e 6c | 69 6e 65 42 72 65 61 6b | (pWE->l|ineBreak|
|00003d70| 48 6f 6f 6b 20 3d 3d 20 | 6e 69 6c 29 0d 09 7b 0d |Hook == |nil)..{.|
|00003d80| 09 09 70 57 45 2d 3e 6c | 69 6e 65 42 72 65 61 6b |..pWE->l|ineBreak|
|00003d90| 48 6f 6f 6b 20 3d 20 5f | 77 65 53 74 64 4c 69 6e |Hook = _|weStdLin|
|00003da0| 65 42 72 65 61 6b 50 72 | 6f 63 3b 0d 09 7d 0d 09 |eBreakPr|oc;..}..|
|00003db0| 69 66 20 28 70 57 45 2d | 3e 77 6f 72 64 42 72 65 |if (pWE-|>wordBre|
|00003dc0| 61 6b 48 6f 6f 6b 20 3d | 3d 20 6e 69 6c 29 0d 09 |akHook =|= nil)..|
|00003dd0| 7b 0d 09 09 70 57 45 2d | 3e 77 6f 72 64 42 72 65 |{...pWE-|>wordBre|
|00003de0| 61 6b 48 6f 6f 6b 20 3d | 20 5f 77 65 53 74 64 57 |akHook =| _weStdW|
|00003df0| 6f 72 64 42 72 65 61 6b | 50 72 6f 63 3b 0d 09 7d |ordBreak|Proc;..}|
|00003e00| 0d 09 69 66 20 28 70 57 | 45 2d 3e 63 68 61 72 42 |..if (pW|E->charB|
|00003e10| 79 74 65 48 6f 6f 6b 20 | 3d 3d 20 6e 69 6c 29 0d |yteHook |== nil).|
|00003e20| 09 7b 0d 09 09 70 57 45 | 2d 3e 63 68 61 72 42 79 |.{...pWE|->charBy|
|00003e30| 74 65 48 6f 6f 6b 20 3d | 20 5f 77 65 53 74 64 43 |teHook =| _weStdC|
|00003e40| 68 61 72 42 79 74 65 50 | 72 6f 63 3b 0d 09 7d 0d |harByteP|roc;..}.|
|00003e50| 09 69 66 20 28 70 57 45 | 2d 3e 63 68 61 72 54 79 |.if (pWE|->charTy|
|00003e60| 70 65 48 6f 6f 6b 20 3d | 3d 20 6e 69 6c 29 0d 09 |peHook =|= nil)..|
|00003e70| 7b 0d 09 09 70 57 45 2d | 3e 63 68 61 72 54 79 70 |{...pWE-|>charTyp|
|00003e80| 65 48 6f 6f 6b 20 3d 20 | 5f 77 65 53 74 64 43 68 |eHook = |_weStdCh|
|00003e90| 61 72 54 79 70 65 50 72 | 6f 63 3b 0d 09 7d 0d 09 |arTypePr|oc;..}..|
|00003ea0| 69 66 20 28 70 57 45 2d | 3e 63 6c 69 63 6b 4c 6f |if (pWE-|>clickLo|
|00003eb0| 6f 70 20 3d 3d 20 6e 69 | 6c 29 0d 09 7b 0d 09 09 |op == ni|l)..{...|
|00003ec0| 70 57 45 2d 3e 63 6c 69 | 63 6b 4c 6f 6f 70 20 3d |pWE->cli|ckLoop =|
|00003ed0| 20 5f 77 65 53 74 64 43 | 6c 69 63 6b 4c 6f 6f 70 | _weStdC|lickLoop|
|00003ee0| 50 72 6f 63 3b 0d 09 7d | 0d 23 69 66 20 57 41 53 |Proc;..}|.#if WAS|
|00003ef0| 54 45 5f 44 52 41 47 5f | 41 4e 44 5f 44 52 4f 50 |TE_DRAG_|AND_DROP|
|00003f00| 0d 09 69 66 20 28 70 57 | 45 2d 3e 68 69 6c 69 74 |..if (pW|E->hilit|
|00003f10| 65 44 72 6f 70 41 72 65 | 61 48 6f 6f 6b 20 3d 3d |eDropAre|aHook ==|
|00003f20| 20 6e 69 6c 29 0d 09 7b | 0d 09 09 70 57 45 2d 3e | nil)..{|...pWE->|
|00003f30| 68 69 6c 69 74 65 44 72 | 6f 70 41 72 65 61 48 6f |hiliteDr|opAreaHo|
|00003f40| 6f 6b 20 3d 20 5f 77 65 | 53 74 64 48 69 6c 69 74 |ok = _we|StdHilit|
|00003f50| 65 44 72 6f 70 41 72 65 | 61 50 72 6f 63 3b 0d 09 |eDropAre|aProc;..|
|00003f60| 7d 0d 23 65 6e 64 69 66 | 0d 09 69 66 20 28 70 57 |}.#endif|..if (pW|
|00003f70| 45 2d 3e 65 72 61 73 65 | 48 6f 6f 6b 20 3d 3d 20 |E->erase|Hook == |
|00003f80| 6e 69 6c 29 0d 09 7b 0d | 09 09 70 57 45 2d 3e 65 |nil)..{.|..pWE->e|
|00003f90| 72 61 73 65 48 6f 6f 6b | 20 3d 20 5f 77 65 53 74 |raseHook| = _weSt|
|00003fa0| 64 45 72 61 73 65 50 72 | 6f 63 3b 0d 09 7d 0d 7d |dErasePr|oc;..}.}|
|00003fb0| 0d 0d 70 61 73 63 61 6c | 20 4f 53 45 72 72 20 57 |..pascal| OSErr W|
|00003fc0| 45 4e 65 77 28 63 6f 6e | 73 74 20 4c 6f 6e 67 52 |ENew(con|st LongR|
|00003fd0| 65 63 74 20 2a 64 65 73 | 74 52 65 63 74 2c 20 63 |ect *des|tRect, c|
|00003fe0| 6f 6e 73 74 20 4c 6f 6e | 67 52 65 63 74 20 2a 76 |onst Lon|gRect *v|
|00003ff0| 69 65 77 52 65 63 74 2c | 20 55 49 6e 74 33 32 20 |iewRect,| UInt32 |
|00004000| 66 65 61 74 75 72 65 73 | 2c 20 57 45 48 61 6e 64 |features|, WEHand|
|00004010| 6c 65 20 2a 68 57 45 29 | 0d 7b 0d 09 57 45 50 74 |le *hWE)|.{..WEPt|
|00004020| 72 20 70 57 45 20 3d 20 | 6e 69 6c 3b 0d 09 55 49 |r pWE = |nil;..UI|
|00004030| 6e 74 33 32 20 61 6c 6c | 6f 63 46 6c 61 67 73 20 |nt32 all|ocFlags |
|00004040| 3d 20 6b 41 6c 6c 6f 63 | 43 6c 65 61 72 3b 0d 09 |= kAlloc|Clear;..|
|00004050| 53 49 6e 74 33 32 20 72 | 65 73 70 6f 6e 73 65 3b |SInt32 r|esponse;|
|00004060| 0d 09 52 65 63 74 20 72 | 3b 0d 09 57 45 52 75 6e |..Rect r|;..WERun|
|00004070| 41 74 74 72 69 62 75 74 | 65 73 20 61 74 74 72 69 |Attribut|es attri|
|00004080| 62 75 74 65 73 3b 0d 09 | 4f 53 45 72 72 20 65 72 |butes;..|OSErr er|
|00004090| 72 3b 0d 0d 09 2f 2f 20 | 61 6c 6c 6f 63 61 74 65 |r;...// |allocate|
|000040a0| 20 74 68 65 20 57 45 20 | 72 65 63 6f 72 64 0d 09 | the WE |record..|
|000040b0| 69 66 20 28 28 65 72 72 | 20 3d 20 5f 57 45 41 6c |if ((err| = _WEAl|
|000040c0| 6c 6f 63 61 74 65 28 73 | 69 7a 65 6f 66 28 57 45 |locate(s|izeof(WE|
|000040d0| 52 65 63 29 2c 20 61 6c | 6c 6f 63 46 6c 61 67 73 |Rec), al|locFlags|
|000040e0| 2c 20 28 48 61 6e 64 6c | 65 20 2a 29 68 57 45 29 |, (Handl|e *)hWE)|
|000040f0| 29 20 21 3d 20 6e 6f 45 | 72 72 29 0d 09 7b 0d 09 |) != noE|rr)..{..|
|00004100| 09 67 6f 74 6f 20 63 6c | 65 61 6e 75 70 3b 0d 09 |.goto cl|eanup;..|
|00004110| 7d 0d 0d 09 2f 2f 20 6c | 6f 63 6b 20 69 74 20 64 |}...// l|ock it d|
|00004120| 6f 77 6e 0d 09 48 4c 6f | 63 6b 28 28 48 61 6e 64 |own..HLo|ck((Hand|
|00004130| 6c 65 29 2a 68 57 45 29 | 3b 0d 09 70 57 45 20 3d |le)*hWE)|;..pWE =|
|00004140| 20 2a 2a 68 57 45 3b 0d | 0d 09 2f 2f 20 67 65 74 | **hWE;.|..// get|
|00004150| 20 61 63 74 69 76 65 20 | 70 6f 72 74 0d 09 47 65 | active |port..Ge|
|00004160| 74 50 6f 72 74 28 26 70 | 57 45 2d 3e 70 6f 72 74 |tPort(&p|WE->port|
|00004170| 29 3b 0d 0d 09 2f 2f 20 | 64 65 74 65 72 6d 69 6e |);...// |determin|
|00004180| 65 20 77 68 65 74 68 65 | 72 20 74 65 6d 70 6f 72 |e whethe|r tempor|
|00004190| 61 72 79 20 6d 65 6d 6f | 72 79 20 73 68 6f 75 6c |ary memo|ry shoul|
|000041a0| 64 20 62 65 20 75 73 65 | 64 20 66 6f 72 20 64 61 |d be use|d for da|
|000041b0| 74 61 20 73 74 72 75 63 | 74 75 72 65 73 0d 09 69 |ta struc|tures..i|
|000041c0| 66 20 28 42 54 53 54 28 | 66 65 61 74 75 72 65 73 |f (BTST(|features|
|000041d0| 2c 20 77 65 46 55 73 65 | 54 65 6d 70 4d 65 6d 29 |, weFUse|TempMem)|
|000041e0| 29 0d 09 7b 0d 09 09 61 | 6c 6c 6f 63 46 6c 61 67 |)..{...a|llocFlag|
|000041f0| 73 20 2b 3d 20 6b 41 6c | 6c 6f 63 54 65 6d 70 3b |s += kAl|locTemp;|
|00004200| 0d 09 7d 0d 0d 09 2f 2f | 20 61 6c 6c 6f 63 61 74 |..}...//| allocat|
|00004210| 65 20 74 68 65 20 74 65 | 78 74 20 68 61 6e 64 6c |e the te|xt handl|
|00004220| 65 20 28 69 6e 69 74 69 | 61 6c 6c 79 20 65 6d 70 |e (initi|ally emp|
|00004230| 74 79 29 0d 09 69 66 20 | 28 28 65 72 72 20 3d 20 |ty)..if |((err = |
|00004240| 5f 57 45 41 6c 6c 6f 63 | 61 74 65 28 30 2c 20 61 |_WEAlloc|ate(0, a|
|00004250| 6c 6c 6f 63 46 6c 61 67 | 73 2c 20 28 48 61 6e 64 |llocFlag|s, (Hand|
|00004260| 6c 65 20 2a 29 26 70 57 | 45 2d 3e 68 54 65 78 74 |le *)&pW|E->hText|
|00004270| 29 29 20 21 3d 20 6e 6f | 45 72 72 29 0d 09 7b 0d |)) != no|Err)..{.|
|00004280| 09 09 67 6f 74 6f 20 63 | 6c 65 61 6e 75 70 3b 0d |..goto c|leanup;.|
|00004290| 09 7d 0d 0d 09 2f 2f 20 | 61 6c 6c 6f 63 61 74 65 |.}...// |allocate|
|000042a0| 20 74 68 65 20 6c 69 6e | 65 20 61 72 72 61 79 0d | the lin|e array.|
|000042b0| 09 69 66 20 28 28 65 72 | 72 20 3d 20 5f 57 45 41 |.if ((er|r = _WEA|
|000042c0| 6c 6c 6f 63 61 74 65 28 | 32 20 2a 20 73 69 7a 65 |llocate(|2 * size|
|000042d0| 6f 66 28 57 45 4c 69 6e | 65 52 65 63 29 2c 20 61 |of(WELin|eRec), a|
|000042e0| 6c 6c 6f 63 46 6c 61 67 | 73 2c 20 28 48 61 6e 64 |llocFlag|s, (Hand|
|000042f0| 6c 65 20 2a 29 26 70 57 | 45 2d 3e 68 4c 69 6e 65 |le *)&pW|E->hLine|
|00004300| 73 29 29 20 21 3d 20 6e | 6f 45 72 72 29 0d 09 7b |s)) != n|oErr)..{|
|00004310| 0d 09 09 67 6f 74 6f 20 | 63 6c 65 61 6e 75 70 3b |...goto |cleanup;|
|00004320| 0d 09 7d 0d 0d 09 2f 2f | 20 61 6c 6c 6f 63 61 74 |..}...//| allocat|
|00004330| 65 20 74 68 65 20 73 74 | 79 6c 65 20 74 61 62 6c |e the st|yle tabl|
|00004340| 65 0d 09 69 66 20 28 28 | 65 72 72 20 3d 20 5f 57 |e..if ((|err = _W|
|00004350| 45 41 6c 6c 6f 63 61 74 | 65 28 73 69 7a 65 6f 66 |EAllocat|e(sizeof|
|00004360| 28 57 45 53 74 79 6c 65 | 54 61 62 6c 65 45 6e 74 |(WEStyle|TableEnt|
|00004370| 72 79 29 2c 20 61 6c 6c | 6f 63 46 6c 61 67 73 2c |ry), all|ocFlags,|
|00004380| 20 28 48 61 6e 64 6c 65 | 20 2a 29 26 70 57 45 2d | (Handle| *)&pWE-|
|00004390| 3e 68 53 74 79 6c 65 73 | 29 29 20 21 3d 20 6e 6f |>hStyles|)) != no|
|000043a0| 45 72 72 29 0d 09 7b 0d | 09 09 67 6f 74 6f 20 63 |Err)..{.|..goto c|
|000043b0| 6c 65 61 6e 75 70 3b 0d | 09 7d 0d 0d 09 2f 2f 20 |leanup;.|.}...// |
|000043c0| 61 6c 6c 6f 63 61 74 65 | 20 74 68 65 20 72 75 6e |allocate| the run|
|000043d0| 20 61 72 72 61 79 0d 09 | 69 66 20 28 28 65 72 72 | array..|if ((err|
|000043e0| 20 3d 20 5f 57 45 41 6c | 6c 6f 63 61 74 65 28 32 | = _WEAl|locate(2|
|000043f0| 20 2a 20 73 69 7a 65 6f | 66 28 57 45 52 75 6e 41 | * sizeo|f(WERunA|
|00004400| 72 72 61 79 45 6e 74 72 | 79 29 2c 20 61 6c 6c 6f |rrayEntr|y), allo|
|00004410| 63 46 6c 61 67 73 2c 20 | 28 48 61 6e 64 6c 65 20 |cFlags, |(Handle |
|00004420| 2a 29 26 70 57 45 2d 3e | 68 52 75 6e 73 29 29 20 |*)&pWE->|hRuns)) |
|00004430| 21 3d 20 6e 6f 45 72 72 | 29 0d 09 7b 0d 09 09 67 |!= noErr|)..{...g|
|00004440| 6f 74 6f 20 63 6c 65 61 | 6e 75 70 3b 0d 09 7d 0d |oto clea|nup;..}.|
|00004450| 0d 09 2f 2f 20 61 6c 6c | 6f 63 61 74 65 20 74 68 |..// all|ocate th|
|00004460| 65 20 75 73 65 72 20 69 | 6e 66 6f 20 61 72 72 61 |e user i|nfo arra|
|00004470| 79 0d 09 69 66 20 28 28 | 65 72 72 20 3d 20 5f 57 |y..if ((|err = _W|
|00004480| 45 41 6c 6c 6f 63 61 74 | 65 28 73 69 7a 65 6f 66 |EAllocat|e(sizeof|
|00004490| 28 57 45 55 73 65 72 49 | 6e 66 6f 45 6e 74 72 79 |(WEUserI|nfoEntry|
|000044a0| 29 2c 20 61 6c 6c 6f 63 | 46 6c 61 67 73 2c 20 26 |), alloc|Flags, &|
|000044b0| 70 57 45 2d 3e 68 55 73 | 65 72 49 6e 66 6f 29 29 |pWE->hUs|erInfo))|
|000044c0| 20 21 3d 20 6e 6f 45 72 | 72 29 0d 09 7b 0d 09 09 | != noEr|r)..{...|
|000044d0| 67 6f 74 6f 20 63 6c 65 | 61 6e 75 70 3b 0d 09 7d |goto cle|anup;..}|
|000044e0| 0d 0d 09 2f 2f 20 63 68 | 65 63 6b 20 66 6f 72 20 |...// ch|eck for |
|000044f0| 74 68 65 20 70 72 65 73 | 65 6e 63 65 20 6f 66 20 |the pres|ence of |
|00004500| 76 61 72 69 6f 75 73 20 | 73 79 73 74 65 6d 20 73 |various |system s|
|00004510| 6f 66 74 77 61 72 65 20 | 66 65 61 74 75 72 65 73 |oftware |features|
|00004520| 0d 09 2f 2f 20 64 65 74 | 65 72 6d 69 6e 65 20 77 |..// det|ermine w|
|00004530| 68 65 74 68 65 72 20 43 | 6f 6c 6f 72 20 51 75 69 |hether C|olor Qui|
|00004540| 63 6b 64 72 61 77 20 69 | 73 20 61 76 61 69 6c 61 |ckdraw i|s availa|
|00004550| 62 6c 65 0d 09 69 66 20 | 28 28 47 65 73 74 61 6c |ble..if |((Gestal|
|00004560| 74 28 67 65 73 74 61 6c | 74 51 75 69 63 6b 64 72 |t(gestal|tQuickdr|
|00004570| 61 77 56 65 72 73 69 6f | 6e 2c 20 26 72 65 73 70 |awVersio|n, &resp|
|00004580| 6f 6e 73 65 29 20 3d 3d | 20 6e 6f 45 72 72 29 20 |onse) ==| noErr) |
|00004590| 26 26 20 28 72 65 73 70 | 6f 6e 73 65 20 3e 3d 20 |&& (resp|onse >= |
|000045a0| 67 65 73 74 61 6c 74 38 | 42 69 74 51 44 29 29 0d |gestalt8|BitQD)).|
|000045b0| 09 7b 0d 09 09 42 53 45 | 54 28 70 57 45 2d 3e 66 |.{...BSE|T(pWE->f|
|000045c0| 6c 61 67 73 2c 20 77 65 | 46 48 61 73 43 6f 6c 6f |lags, we|FHasColo|
|000045d0| 72 51 44 29 3b 0d 09 7d | 0d 0d 23 69 66 20 57 41 |rQD);..}|..#if WA|
|000045e0| 53 54 45 5f 44 52 41 47 | 5f 41 4e 44 5f 44 52 4f |STE_DRAG|_AND_DRO|
|000045f0| 50 0d 09 2f 2f 20 64 65 | 74 65 72 6d 69 6e 65 20 |P..// de|termine |
|00004600| 77 68 65 74 68 65 72 20 | 74 68 65 20 44 72 61 67 |whether |the Drag|
|00004610| 20 4d 61 6e 61 67 65 72 | 20 69 73 20 61 76 61 69 | Manager| is avai|
|00004620| 6c 61 62 6c 65 0d 09 69 | 66 20 28 28 47 65 73 74 |lable..i|f ((Gest|
|00004630| 61 6c 74 28 67 65 73 74 | 61 6c 74 44 72 61 67 4d |alt(gest|altDragM|
|00004640| 67 72 41 74 74 72 2c 20 | 26 72 65 73 70 6f 6e 73 |grAttr, |&respons|
|00004650| 65 29 20 3d 3d 20 6e 6f | 45 72 72 29 20 26 26 20 |e) == no|Err) && |
|00004660| 42 54 53 54 28 72 65 73 | 70 6f 6e 73 65 2c 20 67 |BTST(res|ponse, g|
|00004670| 65 73 74 61 6c 74 44 72 | 61 67 4d 67 72 50 72 65 |estaltDr|agMgrPre|
|00004680| 73 65 6e 74 29 29 0d 09 | 7b 0d 23 69 66 20 54 41 |sent))..|{.#if TA|
|00004690| 52 47 45 54 5f 52 54 5f | 4d 41 43 5f 43 46 4d 0d |RGET_RT_|MAC_CFM.|
|000046a0| 09 09 69 66 20 28 28 55 | 49 6e 74 33 32 29 20 4e |..if ((U|Int32) N|
|000046b0| 65 77 44 72 61 67 20 21 | 3d 20 6b 55 6e 72 65 73 |ewDrag !|= kUnres|
|000046c0| 6f 6c 76 65 64 43 46 72 | 61 67 53 79 6d 62 6f 6c |olvedCFr|agSymbol|
|000046d0| 41 64 64 72 65 73 73 29 | 0d 23 65 6e 64 69 66 0d |Address)|.#endif.|
|000046e0| 09 09 09 42 53 45 54 28 | 70 57 45 2d 3e 66 6c 61 |...BSET(|pWE->fla|
|000046f0| 67 73 2c 20 77 65 46 48 | 61 73 44 72 61 67 4d 61 |gs, weFH|asDragMa|
|00004700| 6e 61 67 65 72 29 3b 0d | 0d 23 69 66 20 57 41 53 |nager);.|.#if WAS|
|00004710| 54 45 5f 54 52 41 4e 53 | 4c 55 43 45 4e 54 5f 44 |TE_TRANS|LUCENT_D|
|00004720| 52 41 47 53 0d 09 09 2f | 2f 20 64 65 74 65 72 6d |RAGS.../|/ determ|
|00004730| 69 6e 65 20 77 68 65 74 | 68 65 72 20 74 72 61 6e |ine whet|her tran|
|00004740| 73 6c 75 63 65 6e 74 20 | 64 72 61 67 73 20 61 72 |slucent |drags ar|
|00004750| 65 20 61 76 61 69 6c 61 | 62 6c 65 0d 09 09 69 66 |e availa|ble...if|
|00004760| 20 28 42 54 53 54 28 72 | 65 73 70 6f 6e 73 65 2c | (BTST(r|esponse,|
|00004770| 20 33 29 29 0d 09 09 7b | 0d 23 69 66 20 54 41 52 | 3))...{|.#if TAR|
|00004780| 47 45 54 5f 52 54 5f 4d | 41 43 5f 43 46 4d 0d 09 |GET_RT_M|AC_CFM..|
|00004790| 09 09 69 66 20 28 28 55 | 49 6e 74 33 32 29 20 53 |..if ((U|Int32) S|
|000047a0| 65 74 44 72 61 67 49 6d | 61 67 65 20 21 3d 20 6b |etDragIm|age != k|
|000047b0| 55 6e 72 65 73 6f 6c 76 | 65 64 43 46 72 61 67 53 |Unresolv|edCFragS|
|000047c0| 79 6d 62 6f 6c 41 64 64 | 72 65 73 73 29 0d 23 65 |ymbolAdd|ress).#e|
|000047d0| 6e 64 69 66 0d 09 09 09 | 09 42 53 45 54 28 70 57 |ndif....|.BSET(pW|
|000047e0| 45 2d 3e 66 6c 61 67 73 | 2c 20 77 65 46 48 61 73 |E->flags|, weFHas|
|000047f0| 54 72 61 6e 73 6c 75 63 | 65 6e 74 44 72 61 67 73 |Transluc|entDrags|
|00004800| 29 3b 0d 09 09 7d 0d 23 | 65 6e 64 69 66 09 2f 2f |);...}.#|endif.//|
|00004810| 20 57 41 53 54 45 5f 54 | 52 41 4e 53 4c 55 43 45 | WASTE_T|RANSLUCE|
|00004820| 4e 54 5f 44 52 41 47 53 | 0d 09 7d 0d 23 65 6e 64 |NT_DRAGS|..}.#end|
|00004830| 69 66 09 2f 2f 20 57 41 | 53 54 45 5f 44 52 41 47 |if.// WA|STE_DRAG|
|00004840| 5f 41 4e 44 5f 44 52 4f | 50 0d 0d 23 69 66 20 57 |_AND_DRO|P..#if W|
|00004850| 41 53 54 45 5f 54 53 4d | 5f 53 55 50 50 4f 52 54 |ASTE_TSM|_SUPPORT|
|00004860| 0d 09 2f 2f 20 64 65 74 | 65 72 6d 69 6e 65 20 77 |..// det|ermine w|
|00004870| 68 65 74 68 65 72 20 74 | 68 65 20 54 65 78 74 20 |hether t|he Text |
|00004880| 53 65 72 76 69 63 65 73 | 20 6d 61 6e 61 67 65 72 |Services| manager|
|00004890| 20 69 73 20 61 76 61 69 | 6c 61 62 6c 65 0d 09 69 | is avai|lable..i|
|000048a0| 66 20 28 47 65 73 74 61 | 6c 74 28 67 65 73 74 61 |f (Gesta|lt(gesta|
|000048b0| 6c 74 54 53 4d 67 72 56 | 65 72 73 69 6f 6e 2c 20 |ltTSMgrV|ersion, |
|000048c0| 26 72 65 73 70 6f 6e 73 | 65 29 20 3d 3d 20 6e 6f |&respons|e) == no|
|000048d0| 45 72 72 29 0d 09 7b 0d | 09 09 42 53 45 54 28 70 |Err)..{.|..BSET(p|
|000048e0| 57 45 2d 3e 66 6c 61 67 | 73 2c 20 77 65 46 48 61 |WE->flag|s, weFHa|
|000048f0| 73 54 65 78 74 53 65 72 | 76 69 63 65 73 29 3b 0d |sTextSer|vices);.|
|00004900| 09 7d 0d 23 65 6e 64 69 | 66 0d 0d 09 2f 2f 20 64 |.}.#endi|f...// d|
|00004910| 65 74 65 72 6d 69 6e 65 | 20 69 66 20 74 68 65 72 |etermine| if ther|
|00004920| 65 20 61 72 65 20 61 6e | 79 20 6e 6f 6e 2d 52 6f |e are an|y non-Ro|
|00004930| 6d 61 6e 20 73 63 72 69 | 70 74 73 20 65 6e 61 62 |man scri|pts enab|
|00004940| 6c 65 64 0d 09 69 66 20 | 28 47 65 74 53 63 72 69 |led..if |(GetScri|
|00004950| 70 74 4d 61 6e 61 67 65 | 72 56 61 72 69 61 62 6c |ptManage|rVariabl|
|00004960| 65 28 73 6d 45 6e 61 62 | 6c 65 64 29 20 3e 20 31 |e(smEnab|led) > 1|
|00004970| 29 0d 09 7b 0d 09 09 42 | 53 45 54 28 70 57 45 2d |)..{...B|SET(pWE-|
|00004980| 3e 66 6c 61 67 73 2c 20 | 77 65 46 4e 6f 6e 52 6f |>flags, |weFNonRo|
|00004990| 6d 61 6e 29 3b 0d 0d 09 | 09 2f 2f 20 64 65 74 65 |man);...|.// dete|
|000049a0| 72 6d 69 6e 65 20 77 68 | 65 74 68 65 72 20 61 20 |rmine wh|ether a |
|000049b0| 64 6f 75 62 6c 65 2d 62 | 79 74 65 20 73 63 72 69 |double-b|yte scri|
|000049c0| 70 74 20 69 73 20 69 6e | 73 74 61 6c 6c 65 64 0d |pt is in|stalled.|
|000049d0| 09 09 69 66 20 28 47 65 | 74 53 63 72 69 70 74 4d |..if (Ge|tScriptM|
|000049e0| 61 6e 61 67 65 72 56 61 | 72 69 61 62 6c 65 28 73 |anagerVa|riable(s|
|000049f0| 6d 44 6f 75 62 6c 65 42 | 79 74 65 29 20 21 3d 20 |mDoubleB|yte) != |
|00004a00| 30 29 0d 09 09 7b 0d 23 | 69 66 20 54 41 52 47 45 |0)...{.#|if TARGE|
|00004a10| 54 5f 43 50 55 5f 36 38 | 4b 0d 09 09 09 42 53 45 |T_CPU_68|K....BSE|
|00004a20| 54 28 70 57 45 2d 3e 66 | 6c 61 67 73 2c 20 77 65 |T(pWE->f|lags, we|
|00004a30| 46 44 6f 75 62 6c 65 42 | 79 74 65 29 3b 09 2f 2f |FDoubleB|yte);.//|
|00004a40| 20 74 68 65 20 57 6f 72 | 6c 64 53 63 72 69 70 74 | the Wor|ldScript|
|00004a50| 20 50 6f 77 65 72 20 41 | 64 61 70 74 65 72 20 62 | Power A|dapter b|
|00004a60| 72 65 61 6b 73 20 74 68 | 69 73 20 3a 2d 28 0d 23 |reaks th|is :-(.#|
|00004a70| 65 6c 73 65 0d 09 09 09 | 53 63 72 69 70 74 43 6f |else....|ScriptCo|
|00004a80| 64 65 20 73 63 72 69 70 | 74 3b 0d 09 09 09 66 6f |de scrip|t;....fo|
|00004a90| 72 20 28 20 73 63 72 69 | 70 74 20 3d 20 73 6d 52 |r ( scri|pt = smR|
|00004aa0| 6f 6d 61 6e 3b 20 73 63 | 72 69 70 74 20 3c 3d 20 |oman; sc|ript <= |
|00004ab0| 73 6d 4b 6c 69 6e 67 6f | 6e 3b 20 73 63 72 69 70 |smKlingo|n; scrip|
|00004ac0| 74 2b 2b 20 29 0d 09 09 | 09 7b 0d 09 09 09 09 69 |t++ )...|.{.....i|
|00004ad0| 66 20 28 47 65 74 53 63 | 72 69 70 74 56 61 72 69 |f (GetSc|riptVari|
|00004ae0| 61 62 6c 65 28 73 63 72 | 69 70 74 2c 20 73 6d 45 |able(scr|ipt, smE|
|00004af0| 6e 61 62 6c 65 64 29 20 | 26 26 0d 09 09 09 09 21 |nabled) |&&.....!|
|00004b00| 20 42 54 53 54 28 47 65 | 74 53 63 72 69 70 74 56 | BTST(Ge|tScriptV|
|00004b10| 61 72 69 61 62 6c 65 28 | 73 63 72 69 70 74 2c 20 |ariable(|script, |
|00004b20| 73 6d 53 63 72 69 70 74 | 46 6c 61 67 73 29 2c 20 |smScript|Flags), |
|00004b30| 73 6d 73 66 53 69 6e 67 | 42 79 74 65 29 29 0d 09 |smsfSing|Byte))..|
|00004b40| 09 09 09 7b 0d 09 09 09 | 09 09 42 53 45 54 28 70 |...{....|..BSET(p|
|00004b50| 57 45 2d 3e 66 6c 61 67 | 73 2c 20 77 65 46 44 6f |WE->flag|s, weFDo|
|00004b60| 75 62 6c 65 42 79 74 65 | 29 3b 0d 09 09 09 09 09 |ubleByte|);......|
|00004b70| 62 72 65 61 6b 3b 0d 09 | 09 09 09 7d 0d 09 09 09 |break;..|...}....|
|00004b80| 7d 0d 23 65 6e 64 69 66 | 0d 09 09 7d 0d 0d 09 09 |}.#endif|...}....|
|00004b90| 2f 2f 20 64 65 74 65 72 | 6d 69 6e 65 20 77 68 65 |// deter|mine whe|
|00004ba0| 74 68 65 72 20 61 20 62 | 69 64 69 72 65 63 74 69 |ther a b|idirecti|
|00004bb0| 6f 6e 61 6c 20 73 63 72 | 69 70 74 20 69 73 20 69 |onal scr|ipt is i|
|00004bc0| 6e 73 74 61 6c 6c 65 64 | 0d 09 09 69 66 20 28 47 |nstalled|...if (G|
|00004bd0| 65 74 53 63 72 69 70 74 | 4d 61 6e 61 67 65 72 56 |etScript|ManagerV|
|00004be0| 61 72 69 61 62 6c 65 28 | 73 6d 42 69 64 69 72 65 |ariable(|smBidire|
|00004bf0| 63 74 29 20 21 3d 20 30 | 29 0d 09 09 7b 0d 09 09 |ct) != 0|)...{...|
|00004c00| 09 42 53 45 54 28 70 57 | 45 2d 3e 66 6c 61 67 73 |.BSET(pW|E->flags|
|00004c10| 2c 20 77 65 46 42 69 64 | 69 72 65 63 74 69 6f 6e |, weFBid|irection|
|00004c20| 61 6c 29 3b 0d 09 09 7d | 0d 09 7d 0d 0d 09 2f 2f |al);...}|..}...//|
|00004c30| 20 69 6e 69 74 69 61 6c | 69 7a 65 20 6d 69 73 63 | initial|ize misc|
|00004c40| 65 6c 6c 61 6e 65 6f 75 | 73 20 66 69 65 6c 64 73 |ellaneou|s fields|
|00004c50| 20 6f 66 20 74 68 65 20 | 57 45 20 72 65 63 6f 72 | of the |WE recor|
|00004c60| 64 0d 09 70 57 45 2d 3e | 6e 4c 69 6e 65 73 20 3d |d..pWE->|nLines =|
|00004c70| 20 31 3b 0d 09 70 57 45 | 2d 3e 6e 53 74 79 6c 65 | 1;..pWE|->nStyle|
|00004c80| 73 20 3d 20 31 3b 0d 09 | 70 57 45 2d 3e 6e 52 75 |s = 1;..|pWE->nRu|
|00004c90| 6e 73 20 3d 20 31 3b 0d | 09 70 57 45 2d 3e 76 69 |ns = 1;.|.pWE->vi|
|00004ca0| 65 77 52 65 63 74 20 3d | 20 2a 76 69 65 77 52 65 |ewRect =| *viewRe|
|00004cb0| 63 74 3b 0d 09 70 57 45 | 2d 3e 64 65 73 74 52 65 |ct;..pWE|->destRe|
|00004cc0| 63 74 20 3d 20 2a 64 65 | 73 74 52 65 63 74 3b 0d |ct = *de|stRect;.|
|00004cd0| 09 70 57 45 2d 3e 64 69 | 72 65 63 74 69 6f 6e 20 |.pWE->di|rection |
|00004ce0| 3d 20 77 65 44 69 72 44 | 65 66 61 75 6c 74 3b 0d |= weDirD|efault;.|
|00004cf0| 09 70 57 45 2d 3e 66 65 | 61 74 75 72 65 73 20 3d |.pWE->fe|atures =|
|00004d00| 20 66 65 61 74 75 72 65 | 73 3b 0d 23 69 66 20 57 | feature|s;.#if W|
|00004d10| 41 53 54 45 5f 54 53 4d | 5f 53 55 50 50 4f 52 54 |ASTE_TSM|_SUPPORT|
|00004d20| 0d 09 70 57 45 2d 3e 74 | 73 6d 41 72 65 61 53 74 |..pWE->t|smAreaSt|
|00004d30| 61 72 74 20 3d 20 6b 49 | 6e 76 61 6c 69 64 4f 66 |art = kI|nvalidOf|
|00004d40| 66 73 65 74 3b 0d 09 70 | 57 45 2d 3e 74 73 6d 41 |fset;..p|WE->tsmA|
|00004d50| 72 65 61 45 6e 64 20 3d | 20 6b 49 6e 76 61 6c 69 |reaEnd =| kInvali|
|00004d60| 64 4f 66 66 73 65 74 3b | 0d 23 65 6e 64 69 66 0d |dOffset;|.#endif.|
|00004d70| 23 69 66 20 57 41 53 54 | 45 5f 44 52 41 47 5f 41 |#if WAST|E_DRAG_A|
|00004d80| 4e 44 5f 44 52 4f 50 0d | 09 70 57 45 2d 3e 64 72 |ND_DROP.|.pWE->dr|
|00004d90| 61 67 43 61 72 65 74 4f | 66 66 73 65 74 20 3d 20 |agCaretO|ffset = |
|00004da0| 6b 49 6e 76 61 6c 69 64 | 4f 66 66 73 65 74 3b 0d |kInvalid|Offset;.|
|00004db0| 23 65 6e 64 69 66 0d 0d | 23 69 66 20 57 41 53 54 |#endif..|#if WAST|
|00004dc0| 45 5f 53 54 59 4c 45 52 | 53 0d 09 70 57 45 2d 3e |E_STYLER|S..pWE->|
|00004dd0| 68 53 74 79 6c 65 72 73 | 20 3d 20 6e 69 6c 3b 0d |hStylers| = nil;.|
|00004de0| 23 65 6e 64 69 66 0d 0d | 23 69 66 20 57 41 53 54 |#endif..|#if WAST|
|00004df0| 45 5f 53 43 41 4c 45 0d | 09 70 57 45 2d 3e 73 63 |E_SCALE.|.pWE->sc|
|00004e00| 61 6c 65 4e 75 6d 65 72 | 20 3d 20 6b 4f 6e 65 54 |aleNumer| = kOneT|
|00004e10| 6f 4f 6e 65 53 63 61 6c | 69 6e 67 3b 0d 09 70 57 |oOneScal|ing;..pW|
|00004e20| 45 2d 3e 73 63 61 6c 65 | 44 65 6e 6f 6d 20 3d 20 |E->scale|Denom = |
|00004e30| 6b 4f 6e 65 54 6f 4f 6e | 65 53 63 61 6c 69 6e 67 |kOneToOn|eScaling|
|00004e40| 3b 0d 23 65 6e 64 69 66 | 0d 0d 09 2f 2f 20 69 6e |;.#endif|...// in|
|00004e50| 69 74 69 61 6c 69 7a 65 | 20 68 6f 6f 6b 20 66 69 |itialize| hook fi|
|00004e60| 65 6c 64 73 20 77 69 74 | 68 20 74 68 65 20 61 64 |elds wit|h the ad|
|00004e70| 64 72 65 73 73 65 73 20 | 6f 66 20 74 68 65 20 73 |dresses |of the s|
|00004e80| 74 61 6e 64 61 72 64 20 | 68 6f 6f 6b 73 0d 09 5f |tandard |hooks.._|
|00004e90| 57 45 53 65 74 53 74 61 | 6e 64 61 72 64 48 6f 6f |WESetSta|ndardHoo|
|00004ea0| 6b 73 28 2a 68 57 45 29 | 3b 0d 0d 09 2f 2f 20 63 |ks(*hWE)|;...// c|
|00004eb0| 72 65 61 74 65 20 61 20 | 72 65 67 69 6f 6e 20 74 |reate a |region t|
|00004ec0| 6f 20 68 6f 6c 64 20 74 | 68 65 20 76 69 65 77 20 |o hold t|he view |
|00004ed0| 72 65 63 74 61 6e 67 6c | 65 0d 09 70 57 45 2d 3e |rectangl|e..pWE->|
|00004ee0| 76 69 65 77 52 67 6e 20 | 3d 20 4e 65 77 52 67 6e |viewRgn |= NewRgn|
|00004ef0| 28 29 3b 0d 09 57 45 4c | 6f 6e 67 52 65 63 74 54 |();..WEL|ongRectT|
|00004f00| 6f 52 65 63 74 28 76 69 | 65 77 52 65 63 74 2c 20 |oRect(vi|ewRect, |
|00004f10| 26 72 29 3b 0d 09 52 65 | 63 74 52 67 6e 28 70 57 |&r);..Re|ctRgn(pW|
|00004f20| 45 2d 3e 76 69 65 77 52 | 67 6e 2c 20 26 72 29 3b |E->viewR|gn, &r);|
|00004f30| 0d 0d 09 2f 2f 20 69 6e | 69 74 69 61 6c 69 7a 65 |...// in|itialize|
|00004f40| 20 74 68 65 20 73 74 79 | 6c 65 20 72 75 6e 20 61 | the sty|le run a|
|00004f50| 72 72 61 79 0d 09 28 2a | 70 57 45 2d 3e 68 52 75 |rray..(*|pWE->hRu|
|00004f60| 6e 73 29 5b 31 5d 2e 72 | 75 6e 53 74 61 72 74 20 |ns)[1].r|unStart |
|00004f70| 3d 20 31 3b 0d 09 28 2a | 70 57 45 2d 3e 68 52 75 |= 1;..(*|pWE->hRu|
|00004f80| 6e 73 29 5b 31 5d 2e 73 | 74 79 6c 65 49 6e 64 65 |ns)[1].s|tyleInde|
|00004f90| 78 20 3d 20 2d 31 3b 0d | 0d 09 2f 2f 20 69 6e 69 |x = -1;.|..// ini|
|00004fa0| 74 69 61 6c 69 7a 65 20 | 74 68 65 20 73 74 79 6c |tialize |the styl|
|00004fb0| 65 20 74 61 62 6c 65 0d | 09 28 2a 70 57 45 2d 3e |e table.|.(*pWE->|
|00004fc0| 68 53 74 79 6c 65 73 29 | 5b 30 5d 2e 72 65 66 43 |hStyles)|[0].refC|
|00004fd0| 6f 75 6e 74 20 3d 20 31 | 3b 0d 0d 09 2f 2f 20 63 |ount = 1|;...// c|
|00004fe0| 6f 70 79 20 74 65 78 74 | 20 61 74 74 72 69 62 75 |opy text| attribu|
|00004ff0| 74 65 73 20 66 72 6f 6d | 20 74 68 65 20 61 63 74 |tes from| the act|
|00005000| 69 76 65 20 67 72 61 70 | 68 69 63 73 20 70 6f 72 |ive grap|hics por|
|00005010| 74 0d 09 42 4c 4f 43 4b | 5f 43 4c 52 28 61 74 74 |t..BLOCK|_CLR(att|
|00005020| 72 69 62 75 74 65 73 29 | 3b 0d 09 61 74 74 72 69 |ributes)|;..attri|
|00005030| 62 75 74 65 73 2e 72 75 | 6e 53 74 79 6c 65 2e 74 |butes.ru|nStyle.t|
|00005040| 73 46 6f 6e 74 20 3d 20 | 47 65 74 54 65 78 74 46 |sFont = |GetTextF|
|00005050| 6f 6e 74 28 70 57 45 2d | 3e 70 6f 72 74 29 3b 0d |ont(pWE-|>port);.|
|00005060| 09 61 74 74 72 69 62 75 | 74 65 73 2e 72 75 6e 53 |.attribu|tes.runS|
|00005070| 74 79 6c 65 2e 74 73 53 | 69 7a 65 20 3d 20 47 65 |tyle.tsS|ize = Ge|
|00005080| 74 54 65 78 74 53 69 7a | 65 28 70 57 45 2d 3e 70 |tTextSiz|e(pWE->p|
|00005090| 6f 72 74 29 3b 0d 09 61 | 74 74 72 69 62 75 74 65 |ort);..a|ttribute|
|000050a0| 73 2e 72 75 6e 53 74 79 | 6c 65 2e 74 73 46 61 63 |s.runSty|le.tsFac|
|000050b0| 65 20 3d 20 47 65 74 54 | 65 78 74 46 61 63 65 28 |e = GetT|extFace(|
|000050c0| 70 57 45 2d 3e 70 6f 72 | 74 29 3b 0d 09 69 66 20 |pWE->por|t);..if |
|000050d0| 28 42 54 53 54 28 70 57 | 45 2d 3e 66 6c 61 67 73 |(BTST(pW|E->flags|
|000050e0| 2c 20 77 65 46 48 61 73 | 43 6f 6c 6f 72 51 44 29 |, weFHas|ColorQD)|
|000050f0| 29 0d 09 7b 0d 09 09 47 | 65 74 46 6f 72 65 43 6f |)..{...G|etForeCo|
|00005100| 6c 6f 72 28 26 61 74 74 | 72 69 62 75 74 65 73 2e |lor(&att|ributes.|
|00005110| 72 75 6e 53 74 79 6c 65 | 2e 74 73 43 6f 6c 6f 72 |runStyle|.tsColor|
|00005120| 29 3b 0d 09 7d 0d 09 5f | 57 45 46 69 6c 6c 46 6f |);..}.._|WEFillFo|
|00005130| 6e 74 49 6e 66 6f 28 70 | 57 45 2d 3e 70 6f 72 74 |ntInfo(p|WE->port|
|00005140| 2c 20 26 61 74 74 72 69 | 62 75 74 65 73 29 3b 0d |, &attri|butes);.|
|00005150| 23 69 66 20 57 41 53 54 | 45 5f 53 43 41 4c 45 0d |#if WAST|E_SCALE.|
|00005160| 09 61 74 74 72 69 62 75 | 74 65 73 2e 72 75 6e 48 |.attribu|tes.runH|
|00005170| 65 69 67 68 74 20 3d 20 | 28 61 74 74 72 69 62 75 |eight = |(attribu|
|00005180| 74 65 73 2e 72 75 6e 48 | 65 69 67 68 74 20 2a 20 |tes.runH|eight * |
|00005190| 70 57 45 2d 3e 73 63 61 | 6c 65 4e 75 6d 65 72 2e |pWE->sca|leNumer.|
|000051a0| 76 29 20 2f 20 70 57 45 | 2d 3e 73 63 61 6c 65 44 |v) / pWE|->scaleD|
|000051b0| 65 6e 6f 6d 2e 76 3b 0d | 09 61 74 74 72 69 62 75 |enom.v;.|.attribu|
|000051c0| 74 65 73 2e 72 75 6e 41 | 73 63 65 6e 74 20 3d 20 |tes.runA|scent = |
|000051d0| 28 61 74 74 72 69 62 75 | 74 65 73 2e 72 75 6e 41 |(attribu|tes.runA|
|000051e0| 73 63 65 6e 74 20 2a 20 | 70 57 45 2d 3e 73 63 61 |scent * |pWE->sca|
|000051f0| 6c 65 4e 75 6d 65 72 2e | 76 29 20 2f 20 70 57 45 |leNumer.|v) / pWE|
|00005200| 2d 3e 73 63 61 6c 65 44 | 65 6e 6f 6d 2e 76 3b 0d |->scaleD|enom.v;.|
|00005210| 23 65 6e 64 69 66 0d 09 | 28 2a 70 57 45 2d 3e 68 |#endif..|(*pWE->h|
|00005220| 53 74 79 6c 65 73 29 5b | 30 5d 2e 69 6e 66 6f 20 |Styles)[|0].info |
|00005230| 3d 20 61 74 74 72 69 62 | 75 74 65 73 3b 0d 0d 09 |= attrib|utes;...|
|00005240| 2f 2f 20 69 6e 69 74 69 | 61 6c 69 7a 65 20 74 68 |// initi|alize th|
|00005250| 65 20 6c 69 6e 65 20 61 | 72 72 61 79 0d 09 69 66 |e line a|rray..if|
|00005260| 20 28 28 65 72 72 20 3d | 20 57 45 43 61 6c 54 65 | ((err =| WECalTe|
|00005270| 78 74 28 2a 68 57 45 29 | 29 20 21 3d 20 6e 6f 45 |xt(*hWE)|) != noE|
|00005280| 72 72 29 0d 09 7b 0d 09 | 09 67 6f 74 6f 20 63 6c |rr)..{..|.goto cl|
|00005290| 65 61 6e 75 70 3b 0d 09 | 7d 0d 0d 23 69 66 20 57 |eanup;..|}..#if W|
|000052a0| 41 53 54 45 5f 54 53 4d | 5f 53 55 50 50 4f 52 54 |ASTE_TSM|_SUPPORT|
|000052b0| 0d 09 2f 2f 20 72 65 67 | 69 73 74 65 72 20 77 69 |..// reg|ister wi|
|000052c0| 74 68 20 74 68 65 20 54 | 65 78 74 20 53 65 72 76 |th the T|ext Serv|
|000052d0| 69 63 65 73 20 4d 61 6e | 61 67 65 72 0d 09 69 66 |ices Man|ager..if|
|000052e0| 20 28 28 65 72 72 20 3d | 20 5f 57 45 52 65 67 69 | ((err =| _WERegi|
|000052f0| 73 74 65 72 57 69 74 68 | 54 53 4d 28 2a 68 57 45 |sterWith|TSM(*hWE|
|00005300| 29 29 20 21 3d 20 6e 6f | 45 72 72 29 0d 09 7b 0d |)) != no|Err)..{.|
|00005310| 09 09 67 6f 74 6f 20 63 | 6c 65 61 6e 75 70 3b 0d |..goto c|leanup;.|
|00005320| 09 7d 0d 23 65 6e 64 69 | 66 0d 0d 09 2f 2f 20 75 |.}.#endi|f...// u|
|00005330| 6e 6c 6f 63 6b 20 74 68 | 65 20 57 45 20 72 65 63 |nlock th|e WE rec|
|00005340| 6f 72 64 0d 09 48 55 6e | 6c 6f 63 6b 28 28 48 61 |ord..HUn|lock((Ha|
|00005350| 6e 64 6c 65 29 2a 68 57 | 45 29 3b 0d 0d 09 2f 2f |ndle)*hW|E);...//|
|00005360| 20 73 6b 69 70 20 63 6c | 65 61 6e 2d 75 70 20 73 | skip cl|ean-up s|
|00005370| 65 63 74 69 6f 6e 0d 09 | 72 65 74 75 72 6e 20 6e |ection..|return n|
|00005380| 6f 45 72 72 3b 0d 0d 63 | 6c 65 61 6e 75 70 3a 0d |oErr;..c|leanup:.|
|00005390| 09 2f 2f 20 63 6c 65 61 | 6e 20 75 70 0d 09 69 66 |.// clea|n up..if|
|000053a0| 20 28 70 57 45 20 21 3d | 20 6e 69 6c 29 0d 09 7b | (pWE !=| nil)..{|
|000053b0| 0d 09 09 5f 57 45 46 6f | 72 67 65 74 48 61 6e 64 |..._WEFo|rgetHand|
|000053c0| 6c 65 28 28 48 61 6e 64 | 6c 65 20 2a 29 20 26 70 |le((Hand|le *) &p|
|000053d0| 57 45 2d 3e 68 54 65 78 | 74 29 3b 0d 09 09 5f 57 |WE->hTex|t);..._W|
|000053e0| 45 46 6f 72 67 65 74 48 | 61 6e 64 6c 65 28 28 48 |EForgetH|andle((H|
|000053f0| 61 6e 64 6c 65 20 2a 29 | 20 26 70 57 45 2d 3e 68 |andle *)| &pWE->h|
|00005400| 4c 69 6e 65 73 29 3b 0d | 09 09 5f 57 45 46 6f 72 |Lines);.|.._WEFor|
|00005410| 67 65 74 48 61 6e 64 6c | 65 28 28 48 61 6e 64 6c |getHandl|e((Handl|
|00005420| 65 20 2a 29 20 26 70 57 | 45 2d 3e 68 53 74 79 6c |e *) &pW|E->hStyl|
|00005430| 65 73 29 3b 0d 09 09 5f | 57 45 46 6f 72 67 65 74 |es);..._|WEForget|
|00005440| 48 61 6e 64 6c 65 28 28 | 48 61 6e 64 6c 65 20 2a |Handle((|Handle *|
|00005450| 29 20 26 70 57 45 2d 3e | 68 52 75 6e 73 29 3b 0d |) &pWE->|hRuns);.|
|00005460| 09 09 5f 57 45 46 6f 72 | 67 65 74 48 61 6e 64 6c |.._WEFor|getHandl|
|00005470| 65 28 26 70 57 45 2d 3e | 68 55 73 65 72 49 6e 66 |e(&pWE->|hUserInf|
|00005480| 6f 29 3b 0d 09 09 69 66 | 20 28 70 57 45 2d 3e 76 |o);...if| (pWE->v|
|00005490| 69 65 77 52 67 6e 20 21 | 3d 20 6e 69 6c 29 0d 09 |iewRgn !|= nil)..|
|000054a0| 09 7b 0d 09 09 09 44 69 | 73 70 6f 73 65 52 67 6e |.{....Di|sposeRgn|
|000054b0| 28 70 57 45 2d 3e 76 69 | 65 77 52 67 6e 29 3b 0d |(pWE->vi|ewRgn);.|
|000054c0| 09 09 7d 0d 09 7d 0d 09 | 5f 57 45 46 6f 72 67 65 |..}..}..|_WEForge|
|000054d0| 74 48 61 6e 64 6c 65 28 | 28 48 61 6e 64 6c 65 20 |tHandle(|(Handle |
|000054e0| 2a 29 68 57 45 29 3b 0d | 0d 09 72 65 74 75 72 6e |*)hWE);.|..return|
|000054f0| 20 65 72 72 3b 0d 7d 0d | 0d 70 61 73 63 61 6c 20 | err;.}.|.pascal |
|00005500| 76 6f 69 64 20 5f 57 45 | 52 65 73 65 74 53 74 79 |void _WE|ResetSty|
|00005510| 6c 65 54 61 62 6c 65 28 | 57 45 48 61 6e 64 6c 65 |leTable(|WEHandle|
|00005520| 20 68 57 45 29 0d 7b 0d | 09 57 45 50 74 72 20 70 | hWE).{.|.WEPtr p|
|00005530| 57 45 20 3d 20 2a 68 57 | 45 3b 09 2f 2f 20 61 73 |WE = *hW|E;.// as|
|00005540| 73 75 6d 65 20 57 45 20 | 72 65 63 6f 72 64 20 69 |sume WE |record i|
|00005550| 73 20 61 6c 72 65 61 64 | 79 20 6c 6f 63 6b 65 64 |s alread|y locked|
|00005560| 0d 09 53 49 6e 74 33 32 | 20 69 6e 64 65 78 3b 0d |..SInt32| index;.|
|00005570| 09 57 45 53 74 79 6c 65 | 54 61 62 6c 65 45 6e 74 |.WEStyle|TableEnt|
|00005580| 72 79 20 2a 70 54 61 62 | 6c 65 3b 0d 09 42 6f 6f |ry *pTab|le;..Boo|
|00005590| 6c 65 61 6e 20 73 61 76 | 65 54 61 62 6c 65 4c 6f |lean sav|eTableLo|
|000055a0| 63 6b 3b 0d 0d 09 2f 2f | 20 73 61 6e 69 74 79 20 |ck;...//| sanity |
|000055b0| 63 68 65 63 6b 0d 09 69 | 66 20 28 70 57 45 2d 3e |check..i|f (pWE->|
|000055c0| 68 53 74 79 6c 65 73 20 | 3d 3d 20 6e 69 6c 29 0d |hStyles |== nil).|
|000055d0| 09 7b 0d 09 09 72 65 74 | 75 72 6e 3b 0d 09 7d 0d |.{...ret|urn;..}.|
|000055e0| 0d 09 2f 2f 20 6c 6f 63 | 6b 20 74 68 65 20 73 74 |..// loc|k the st|
|000055f0| 79 6c 65 20 74 61 62 6c | 65 0d 09 73 61 76 65 54 |yle tabl|e..saveT|
|00005600| 61 62 6c 65 4c 6f 63 6b | 20 3d 20 5f 57 45 53 65 |ableLock| = _WESe|
|00005610| 74 48 61 6e 64 6c 65 4c | 6f 63 6b 28 28 48 61 6e |tHandleL|ock((Han|
|00005620| 64 6c 65 29 20 70 57 45 | 2d 3e 68 53 74 79 6c 65 |dle) pWE|->hStyle|
|00005630| 73 2c 20 74 72 75 65 29 | 3b 0d 09 70 54 61 62 6c |s, true)|;..pTabl|
|00005640| 65 20 3d 20 2a 70 57 45 | 2d 3e 68 53 74 79 6c 65 |e = *pWE|->hStyle|
|00005650| 73 3b 0d 0d 09 2f 2f 20 | 77 61 6c 6b 20 74 68 65 |s;...// |walk the|
|00005660| 20 73 74 79 6c 65 20 74 | 61 62 6c 65 2c 20 64 69 | style t|able, di|
|00005670| 73 70 6f 73 69 6e 67 20 | 6f 66 20 61 6c 6c 20 65 |sposing |of all e|
|00005680| 6d 62 65 64 64 65 64 20 | 6f 62 6a 65 63 74 73 20 |mbedded |objects |
|00005690| 72 65 66 65 72 65 6e 63 | 65 64 20 74 68 65 72 65 |referenc|ed there|
|000056a0| 0d 09 69 6e 64 65 78 20 | 3d 20 70 57 45 2d 3e 6e |..index |= pWE->n|
|000056b0| 53 74 79 6c 65 73 3b 0d | 09 77 68 69 6c 65 20 28 |Styles;.|.while (|
|000056c0| 20 2d 2d 69 6e 64 65 78 | 20 3e 3d 20 30 20 29 0d | --index| >= 0 ).|
|000056d0| 09 7b 0d 0d 23 69 66 20 | 57 41 53 54 45 5f 4f 42 |.{..#if |WASTE_OB|
|000056e0| 4a 45 43 54 53 0d 09 09 | 69 66 20 28 70 54 61 62 |JECTS...|if (pTab|
|000056f0| 6c 65 2d 3e 69 6e 66 6f | 2e 72 75 6e 53 74 79 6c |le->info|.runStyl|
|00005700| 65 2e 74 73 4f 62 6a 65 | 63 74 20 21 3d 20 6e 69 |e.tsObje|ct != ni|
|00005710| 6c 29 0d 09 09 7b 0d 09 | 09 09 5f 57 45 46 72 65 |l)...{..|.._WEFre|
|00005720| 65 4f 62 6a 65 63 74 28 | 70 54 61 62 6c 65 2d 3e |eObject(|pTable->|
|00005730| 69 6e 66 6f 2e 72 75 6e | 53 74 79 6c 65 2e 74 73 |info.run|Style.ts|
|00005740| 4f 62 6a 65 63 74 29 3b | 0d 09 09 09 70 54 61 62 |Object);|....pTab|
|00005750| 6c 65 2d 3e 69 6e 66 6f | 2e 72 75 6e 53 74 79 6c |le->info|.runStyl|
|00005760| 65 2e 74 73 4f 62 6a 65 | 63 74 20 3d 20 6e 69 6c |e.tsObje|ct = nil|
|00005770| 3b 0d 09 09 7d 0d 23 65 | 6e 64 69 66 0d 0d 09 09 |;...}.#e|ndif....|
|00005780| 70 54 61 62 6c 65 2d 3e | 72 65 66 43 6f 75 6e 74 |pTable->|refCount|
|00005790| 20 3d 20 30 3b 0d 09 09 | 70 54 61 62 6c 65 2b 2b | = 0;...|pTable++|
|000057a0| 3b 0d 09 7d 3b 0d 0d 09 | 2f 2f 20 75 6e 6c 6f 63 |;..};...|// unloc|
|000057b0| 6b 20 74 68 65 20 73 74 | 79 6c 65 20 74 61 62 6c |k the st|yle tabl|
|000057c0| 65 0d 09 5f 57 45 53 65 | 74 48 61 6e 64 6c 65 4c |e.._WESe|tHandleL|
|000057d0| 6f 63 6b 28 28 48 61 6e | 64 6c 65 29 20 70 57 45 |ock((Han|dle) pWE|
|000057e0| 2d 3e 68 53 74 79 6c 65 | 73 2c 20 73 61 76 65 54 |->hStyle|s, saveT|
|000057f0| 61 62 6c 65 4c 6f 63 6b | 29 3b 0d 7d 0d 0d 70 61 |ableLock|);.}..pa|
|00005800| 73 63 61 6c 20 76 6f 69 | 64 20 57 45 44 69 73 70 |scal voi|d WEDisp|
|00005810| 6f 73 65 28 57 45 48 61 | 6e 64 6c 65 20 68 57 45 |ose(WEHa|ndle hWE|
|00005820| 29 0d 7b 0d 09 57 45 50 | 74 72 20 70 57 45 3b 0d |).{..WEP|tr pWE;.|
|00005830| 0d 09 2f 2f 20 73 61 6e | 69 74 79 20 63 68 65 63 |..// san|ity chec|
|00005840| 6b 3a 20 6d 61 6b 65 20 | 73 75 72 65 20 57 45 20 |k: make |sure WE |
|00005850| 69 73 6e 27 74 20 6e 69 | 6c 0d 09 69 66 20 28 68 |isn't ni|l..if (h|
|00005860| 57 45 20 3d 3d 20 6e 69 | 6c 29 0d 09 7b 0d 09 09 |WE == ni|l)..{...|
|00005870| 72 65 74 75 72 6e 3b 0d | 09 7d 0d 0d 09 2f 2f 20 |return;.|.}...// |
|00005880| 6c 6f 63 6b 20 74 68 65 | 20 57 45 20 72 65 63 6f |lock the| WE reco|
|00005890| 72 64 0d 09 48 4c 6f 63 | 6b 28 28 48 61 6e 64 6c |rd..HLoc|k((Handl|
|000058a0| 65 29 20 68 57 45 29 3b | 0d 09 70 57 45 20 3d 20 |e) hWE);|..pWE = |
|000058b0| 2a 68 57 45 3b 0d 0d 09 | 2f 2f 20 63 6c 65 61 72 |*hWE;...|// clear|
|000058c0| 20 74 68 65 20 55 6e 64 | 6f 20 62 75 66 66 65 72 | the Und|o buffer|
|000058d0| 0d 09 5f 57 45 46 6f 72 | 67 65 74 41 63 74 69 6f |.._WEFor|getActio|
|000058e0| 6e 28 26 70 57 45 2d 3e | 68 41 63 74 69 6f 6e 53 |n(&pWE->|hActionS|
|000058f0| 74 61 63 6b 29 3b 0d 0d | 23 69 66 20 57 41 53 54 |tack);..|#if WAST|
|00005900| 45 5f 54 53 4d 5f 53 55 | 50 50 4f 52 54 0d 09 2f |E_TSM_SU|PPORT../|
|00005910| 2f 20 75 6e 72 65 67 69 | 73 74 65 72 20 77 69 74 |/ unregi|ster wit|
|00005920| 68 20 74 68 65 20 54 65 | 78 74 20 53 65 72 76 69 |h the Te|xt Servi|
|00005930| 63 65 73 20 4d 61 6e 61 | 67 65 72 0d 09 69 66 20 |ces Mana|ger..if |
|00005940| 28 70 57 45 2d 3e 74 73 | 6d 52 65 66 65 72 65 6e |(pWE->ts|mReferen|
|00005950| 63 65 20 21 3d 20 6e 69 | 6c 29 0d 09 7b 0d 09 09 |ce != ni|l)..{...|
|00005960| 44 65 6c 65 74 65 54 53 | 4d 44 6f 63 75 6d 65 6e |DeleteTS|MDocumen|
|00005970| 74 28 70 57 45 2d 3e 74 | 73 6d 52 65 66 65 72 65 |t(pWE->t|smRefere|
|00005980| 6e 63 65 29 3b 0d 09 09 | 70 57 45 2d 3e 74 73 6d |nce);...|pWE->tsm|
|00005990| 52 65 66 65 72 65 6e 63 | 65 20 3d 20 6e 69 6c 3b |Referenc|e = nil;|
|000059a0| 0d 09 7d 0d 23 65 6e 64 | 69 66 0d 0d 09 2f 2f 20 |..}.#end|if...// |
|000059b0| 64 69 73 70 6f 73 65 20 | 6f 66 20 74 68 65 20 6f |dispose |of the o|
|000059c0| 66 66 73 63 72 65 65 6e | 20 67 72 61 70 68 69 63 |ffscreen| graphic|
|000059d0| 73 20 77 6f 72 6c 64 0d | 09 69 66 20 28 70 57 45 |s world.|.if (pWE|
|000059e0| 2d 3e 6f 66 66 73 63 72 | 65 65 6e 50 6f 72 74 20 |->offscr|eenPort |
|000059f0| 21 3d 20 6e 69 6c 29 0d | 09 7b 0d 09 09 44 69 73 |!= nil).|.{...Dis|
|00005a00| 70 6f 73 65 47 57 6f 72 | 6c 64 28 28 47 57 6f 72 |poseGWor|ld((GWor|
|00005a10| 6c 64 50 74 72 29 70 57 | 45 2d 3e 6f 66 66 73 63 |ldPtr)pW|E->offsc|
|00005a20| 72 65 65 6e 50 6f 72 74 | 29 3b 0d 09 09 70 57 45 |reenPort|);...pWE|
|00005a30| 2d 3e 6f 66 66 73 63 72 | 65 65 6e 50 6f 72 74 20 |->offscr|eenPort |
|00005a40| 3d 20 6e 69 6c 3b 0d 09 | 7d 0d 0d 23 69 66 20 57 |= nil;..|}..#if W|
|00005a50| 41 53 54 45 5f 53 54 59 | 4c 45 52 53 0d 09 5f 57 |ASTE_STY|LERS.._W|
|00005a60| 45 52 65 73 65 74 53 74 | 79 6c 65 72 73 28 70 57 |EResetSt|ylers(pW|
|00005a70| 45 2d 3e 68 53 74 79 6c | 65 72 73 29 3b 0d 09 5f |E->hStyl|ers);.._|
|00005a80| 57 45 46 6f 72 67 65 74 | 48 61 6e 64 6c 65 28 28 |WEForget|Handle((|
|00005a90| 48 61 6e 64 6c 65 20 2a | 29 20 26 70 57 45 2d 3e |Handle *|) &pWE->|
|00005aa0| 68 53 74 79 6c 65 72 73 | 29 3b 0d 23 65 6e 64 69 |hStylers|);.#endi|
|00005ab0| 66 0d 0d 23 69 66 20 57 | 41 53 54 45 5f 4f 42 4a |f..#if W|ASTE_OBJ|
|00005ac0| 45 43 54 53 0d 09 2f 2f | 20 72 65 6c 65 61 73 65 |ECTS..//| release|
|00005ad0| 20 61 6c 6c 20 65 6d 62 | 65 64 64 65 64 20 6f 62 | all emb|edded ob|
|00005ae0| 6a 65 63 74 73 20 77 65 | 20 6b 6e 6f 77 20 61 62 |jects we| know ab|
|00005af0| 6f 75 74 0d 09 5f 57 45 | 52 65 73 65 74 53 74 79 |out.._WE|ResetSty|
|00005b00| 6c 65 54 61 62 6c 65 28 | 68 57 45 29 3b 0d 0d 09 |leTable(|hWE);...|
|00005b10| 2f 2f 20 64 69 73 70 6f | 73 65 20 69 6e 73 74 61 |// dispo|se insta|
|00005b20| 6e 63 65 2d 73 70 65 63 | 69 66 69 63 20 6f 62 6a |nce-spec|ific obj|
|00005b30| 65 63 74 20 68 61 6e 64 | 6c 65 72 20 74 61 62 6c |ect hand|ler tabl|
|00005b40| 65 0d 09 5f 57 45 46 6f | 72 67 65 74 48 61 6e 64 |e.._WEFo|rgetHand|
|00005b50| 6c 65 28 28 48 61 6e 64 | 6c 65 20 2a 29 20 26 70 |le((Hand|le *) &p|
|00005b60| 57 45 2d 3e 68 4f 62 6a | 65 63 74 48 61 6e 64 6c |WE->hObj|ectHandl|
|00005b70| 65 72 54 61 62 6c 65 29 | 3b 0d 23 65 6e 64 69 66 |erTable)|;.#endif|
|00005b80| 0d 0d 09 2f 2f 20 64 69 | 73 70 6f 73 65 20 6f 66 |...// di|spose of|
|00005b90| 20 61 75 78 69 6c 69 61 | 72 79 20 64 61 74 61 20 | auxilia|ry data |
|00005ba0| 73 74 72 75 63 74 75 72 | 65 73 0d 09 5f 57 45 46 |structur|es.._WEF|
|00005bb0| 6f 72 67 65 74 48 61 6e | 64 6c 65 28 28 48 61 6e |orgetHan|dle((Han|
|00005bc0| 64 6c 65 20 2a 29 20 26 | 70 57 45 2d 3e 68 54 65 |dle *) &|pWE->hTe|
|00005bd0| 78 74 29 3b 0d 09 5f 57 | 45 46 6f 72 67 65 74 48 |xt);.._W|EForgetH|
|00005be0| 61 6e 64 6c 65 28 28 48 | 61 6e 64 6c 65 20 2a 29 |andle((H|andle *)|
|00005bf0| 20 26 70 57 45 2d 3e 68 | 4c 69 6e 65 73 29 3b 0d | &pWE->h|Lines);.|
|00005c00| 09 5f 57 45 46 6f 72 67 | 65 74 48 61 6e 64 6c 65 |._WEForg|etHandle|
|00005c10| 28 28 48 61 6e 64 6c 65 | 20 2a 29 20 26 70 57 45 |((Handle| *) &pWE|
|00005c20| 2d 3e 68 53 74 79 6c 65 | 73 29 3b 0d 09 5f 57 45 |->hStyle|s);.._WE|
|00005c30| 46 6f 72 67 65 74 48 61 | 6e 64 6c 65 28 28 48 61 |ForgetHa|ndle((Ha|
|00005c40| 6e 64 6c 65 20 2a 29 20 | 26 70 57 45 2d 3e 68 52 |ndle *) |&pWE->hR|
|00005c50| 75 6e 73 29 3b 0d 09 5f | 57 45 46 6f 72 67 65 74 |uns);.._|WEForget|
|00005c60| 48 61 6e 64 6c 65 28 26 | 70 57 45 2d 3e 68 55 73 |Handle(&|pWE->hUs|
|00005c70| 65 72 49 6e 66 6f 29 3b | 0d 09 44 69 73 70 6f 73 |erInfo);|..Dispos|
|00005c80| 65 52 67 6e 28 70 57 45 | 2d 3e 76 69 65 77 52 67 |eRgn(pWE|->viewRg|
|00005c90| 6e 29 3b 0d 0d 09 2f 2f | 20 64 69 73 70 6f 73 65 |n);...//| dispose|
|00005ca0| 20 6f 66 20 74 68 65 20 | 57 45 20 72 65 63 6f 72 | of the |WE recor|
|00005cb0| 64 0d 09 44 69 73 70 6f | 73 65 48 61 6e 64 6c 65 |d..Dispo|seHandle|
|00005cc0| 28 28 48 61 6e 64 6c 65 | 29 20 68 57 45 29 3b 0d |((Handle|) hWE);.|
|00005cd0| 7d 0d 0d 70 61 73 63 61 | 6c 20 4f 53 45 72 72 20 |}..pasca|l OSErr |
|00005ce0| 57 45 55 73 65 54 65 78 | 74 28 48 61 6e 64 6c 65 |WEUseTex|t(Handle|
|00005cf0| 20 74 65 78 74 2c 20 57 | 45 48 61 6e 64 6c 65 20 | text, W|EHandle |
|00005d00| 68 57 45 29 0d 7b 0d 09 | 57 45 50 74 72 20 70 57 |hWE).{..|WEPtr pW|
|00005d10| 45 3b 0d 09 57 45 52 75 | 6e 41 72 72 61 79 45 6e |E;..WERu|nArrayEn|
|00005d20| 74 72 79 20 2a 70 52 75 | 6e 73 3b 0d 09 57 45 4c |try *pRu|ns;..WEL|
|00005d30| 69 6e 65 52 65 63 20 2a | 70 4c 69 6e 65 73 3b 0d |ineRec *|pLines;.|
|00005d40| 09 53 49 6e 74 33 32 20 | 74 65 78 74 4c 65 6e 67 |.SInt32 |textLeng|
|00005d50| 74 68 3b 0d 09 42 6f 6f | 6c 65 61 6e 20 73 61 76 |th;..Boo|lean sav|
|00005d60| 65 57 45 4c 6f 63 6b 3b | 0d 0d 09 2f 2f 20 6c 6f |eWELock;|...// lo|
|00005d70| 63 6b 20 74 68 65 20 57 | 45 20 72 65 63 6f 72 64 |ck the W|E record|
|00005d80| 0d 09 73 61 76 65 57 45 | 4c 6f 63 6b 20 3d 20 5f |..saveWE|Lock = _|
|00005d90| 57 45 53 65 74 48 61 6e | 64 6c 65 4c 6f 63 6b 28 |WESetHan|dleLock(|
|00005da0| 28 48 61 6e 64 6c 65 29 | 20 68 57 45 2c 20 74 72 |(Handle)| hWE, tr|
|00005db0| 75 65 29 3b 0d 09 70 57 | 45 20 3d 20 2a 68 57 45 |ue);..pW|E = *hWE|
|00005dc0| 3b 0d 0d 09 2f 2f 20 73 | 74 6f 70 20 61 6e 79 20 |;...// s|top any |
|00005dd0| 6f 6e 67 6f 69 6e 67 20 | 69 6e 6c 69 6e 65 20 73 |ongoing |inline s|
|00005de0| 65 73 73 69 6f 6e 0d 09 | 57 45 53 74 6f 70 49 6e |ession..|WEStopIn|
|00005df0| 6c 69 6e 65 53 65 73 73 | 69 6f 6e 28 68 57 45 29 |lineSess|ion(hWE)|
|00005e00| 3b 0d 0d 09 2f 2f 20 72 | 65 73 65 74 20 6d 6f 64 |;...// r|eset mod|
|00005e10| 69 66 69 63 61 74 69 6f | 6e 20 63 6f 75 6e 74 20 |ificatio|n count |
|00005e20| 61 6e 64 20 63 6c 65 61 | 72 20 75 6e 64 6f 20 62 |and clea|r undo b|
|00005e30| 75 66 66 65 72 2c 20 69 | 66 20 61 6e 79 0d 09 57 |uffer, i|f any..W|
|00005e40| 45 52 65 73 65 74 4d 6f | 64 43 6f 75 6e 74 28 68 |EResetMo|dCount(h|
|00005e50| 57 45 29 3b 0d 0d 09 2f | 2f 20 72 65 73 65 74 20 |WE);.../|/ reset |
|00005e60| 74 68 65 20 73 74 79 6c | 65 20 74 61 62 6c 65 2c |the styl|e table,|
|00005e70| 20 64 69 73 70 6f 73 69 | 6e 67 20 6f 66 20 61 6c | disposi|ng of al|
|00005e80| 6c 20 65 6d 62 65 64 64 | 65 64 20 6f 62 6a 65 63 |l embedd|ed objec|
|00005e90| 74 73 20 69 74 20 72 65 | 66 65 72 65 6e 63 65 73 |ts it re|ferences|
|00005ea0| 0d 09 5f 57 45 52 65 73 | 65 74 53 74 79 6c 65 54 |.._WERes|etStyleT|
|00005eb0| 61 62 6c 65 28 68 57 45 | 29 3b 0d 0d 09 2f 2f 20 |able(hWE|);...// |
|00005ec0| 69 6e 73 74 61 6c 6c 20 | 74 68 65 20 74 65 78 74 |install |the text|
|00005ed0| 0d 09 5f 57 45 46 6f 72 | 67 65 74 48 61 6e 64 6c |.._WEFor|getHandl|
|00005ee0| 65 28 26 70 57 45 2d 3e | 68 54 65 78 74 29 3b 0d |e(&pWE->|hText);.|
|00005ef0| 09 70 57 45 2d 3e 68 54 | 65 78 74 20 3d 20 74 65 |.pWE->hT|ext = te|
|00005f00| 78 74 3b 0d 09 74 65 78 | 74 4c 65 6e 67 74 68 20 |xt;..tex|tLength |
|00005f10| 3d 20 47 65 74 48 61 6e | 64 6c 65 53 69 7a 65 28 |= GetHan|dleSize(|
|00005f20| 74 65 78 74 29 3b 0d 09 | 70 57 45 2d 3e 74 65 78 |text);..|pWE->tex|
|00005f30| 74 4c 65 6e 67 74 68 20 | 3d 20 74 65 78 74 4c 65 |tLength |= textLe|
|00005f40| 6e 67 74 68 3b 0d 0d 09 | 2f 2f 20 72 65 73 65 74 |ngth;...|// reset|
|00005f50| 20 74 68 65 20 72 75 6e | 20 61 72 72 61 79 0d 09 | the run| array..|
|00005f60| 53 65 74 48 61 6e 64 6c | 65 53 69 7a 65 28 28 48 |SetHandl|eSize((H|
|00005f70| 61 6e 64 6c 65 29 20 70 | 57 45 2d 3e 68 52 75 6e |andle) p|WE->hRun|
|00005f80| 73 2c 20 32 20 2a 20 73 | 69 7a 65 6f 66 28 57 45 |s, 2 * s|izeof(WE|
|00005f90| 52 75 6e 41 72 72 61 79 | 45 6e 74 72 79 29 29 3b |RunArray|Entry));|
|00005fa0| 0d 09 70 57 45 2d 3e 6e | 52 75 6e 73 20 3d 20 31 |..pWE->n|Runs = 1|
|00005fb0| 3b 0d 09 70 52 75 6e 73 | 20 3d 20 2a 70 57 45 2d |;..pRuns| = *pWE-|
|00005fc0| 3e 68 52 75 6e 73 3b 0d | 09 70 52 75 6e 73 5b 31 |>hRuns;.|.pRuns[1|
|00005fd0| 5d 2e 72 75 6e 53 74 61 | 72 74 20 3d 20 74 65 78 |].runSta|rt = tex|
|00005fe0| 74 4c 65 6e 67 74 68 20 | 2b 20 31 3b 0d 09 70 52 |tLength |+ 1;..pR|
|00005ff0| 75 6e 73 5b 31 5d 2e 73 | 74 79 6c 65 49 6e 64 65 |uns[1].s|tyleInde|
|00006000| 78 20 3d 20 2d 31 3b 0d | 0d 09 2f 2f 20 66 69 78 |x = -1;.|..// fix|
|00006010| 20 74 68 65 20 72 65 66 | 43 6f 75 6e 74 20 6f 66 | the ref|Count of|
|00006020| 20 74 68 65 20 73 74 79 | 6c 65 20 74 61 62 6c 65 | the sty|le table|
|00006030| 20 65 6e 74 72 79 20 72 | 65 66 65 72 65 6e 63 65 | entry r|eference|
|00006040| 64 20 62 79 20 74 68 65 | 20 6f 6e 6c 79 20 72 75 |d by the| only ru|
|00006050| 6e 0d 09 28 2a 70 57 45 | 2d 3e 68 53 74 79 6c 65 |n..(*pWE|->hStyle|
|00006060| 73 29 5b 70 52 75 6e 73 | 5b 30 5d 2e 73 74 79 6c |s)[pRuns|[0].styl|
|00006070| 65 49 6e 64 65 78 5d 2e | 72 65 66 43 6f 75 6e 74 |eIndex].|refCount|
|00006080| 20 3d 20 31 3b 0d 0d 09 | 2f 2f 20 72 65 73 65 74 | = 1;...|// reset|
|00006090| 20 74 68 65 20 6c 69 6e | 65 20 61 72 72 61 79 0d | the lin|e array.|
|000060a0| 09 53 65 74 48 61 6e 64 | 6c 65 53 69 7a 65 28 28 |.SetHand|leSize((|
|000060b0| 48 61 6e 64 6c 65 29 20 | 70 57 45 2d 3e 68 4c 69 |Handle) |pWE->hLi|
|000060c0| 6e 65 73 2c 20 32 20 2a | 20 73 69 7a 65 6f 66 28 |nes, 2 *| sizeof(|
|000060d0| 57 45 4c 69 6e 65 52 65 | 63 29 29 3b 0d 09 70 57 |WELineRe|c));..pW|
|000060e0| 45 2d 3e 6e 4c 69 6e 65 | 73 20 3d 20 31 3b 0d 09 |E->nLine|s = 1;..|
|000060f0| 70 4c 69 6e 65 73 20 3d | 20 2a 70 57 45 2d 3e 68 |pLines =| *pWE->h|
|00006100| 4c 69 6e 65 73 3b 0d 09 | 5f 57 45 42 6c 6f 63 6b |Lines;..|_WEBlock|
|00006110| 43 6c 72 28 70 4c 69 6e | 65 73 2c 20 32 20 2a 20 |Clr(pLin|es, 2 * |
|00006120| 73 69 7a 65 6f 66 28 57 | 45 4c 69 6e 65 52 65 63 |sizeof(W|ELineRec|
|00006130| 29 29 3b 0d 09 70 4c 69 | 6e 65 73 5b 31 5d 2e 6c |));..pLi|nes[1].l|
|00006140| 69 6e 65 53 74 61 72 74 | 20 3d 20 74 65 78 74 4c |ineStart| = textL|
|00006150| 65 6e 67 74 68 3b 0d 0d | 09 2f 2f 20 72 65 73 65 |ength;..|.// rese|
|00006160| 74 20 73 65 76 65 72 61 | 6c 20 66 69 65 6c 64 73 |t severa|l fields|
|00006170| 20 6f 66 20 74 68 65 20 | 57 45 20 72 65 63 6f 72 | of the |WE recor|
|00006180| 64 0d 09 70 57 45 2d 3e | 73 65 6c 53 74 61 72 74 |d..pWE->|selStart|
|00006190| 20 3d 20 30 3b 0d 09 70 | 57 45 2d 3e 73 65 6c 45 | = 0;..p|WE->selE|
|000061a0| 6e 64 20 3d 20 30 3b 0d | 09 70 57 45 2d 3e 66 69 |nd = 0;.|.pWE->fi|
|000061b0| 72 73 74 42 79 74 65 20 | 3d 20 30 3b 0d 09 70 57 |rstByte |= 0;..pW|
|000061c0| 45 2d 3e 63 6c 69 63 6b | 43 6f 75 6e 74 20 3d 20 |E->click|Count = |
|000061d0| 30 3b 0d 23 69 66 20 57 | 41 53 54 45 5f 54 53 4d |0;.#if W|ASTE_TSM|
|000061e0| 5f 53 55 50 50 4f 52 54 | 0d 09 70 57 45 2d 3e 74 |_SUPPORT|..pWE->t|
|000061f0| 73 6d 41 72 65 61 53 74 | 61 72 74 20 3d 20 6b 49 |smAreaSt|art = kI|
|00006200| 6e 76 61 6c 69 64 4f 66 | 66 73 65 74 3b 0d 09 70 |nvalidOf|fset;..p|
|00006210| 57 45 2d 3e 74 73 6d 41 | 72 65 61 45 6e 64 20 3d |WE->tsmA|reaEnd =|
|00006220| 20 6b 49 6e 76 61 6c 69 | 64 4f 66 66 73 65 74 3b | kInvali|dOffset;|
|00006230| 0d 23 65 6e 64 69 66 0d | 23 69 66 20 57 41 53 54 |.#endif.|#if WAST|
|00006240| 45 5f 44 52 41 47 5f 41 | 4e 44 5f 44 52 4f 50 0d |E_DRAG_A|ND_DROP.|
|00006250| 09 70 57 45 2d 3e 64 72 | 61 67 43 61 72 65 74 4f |.pWE->dr|agCaretO|
|00006260| 66 66 73 65 74 20 3d 20 | 6b 49 6e 76 61 6c 69 64 |ffset = |kInvalid|
|00006270| 4f 66 66 73 65 74 3b 0d | 23 65 6e 64 69 66 0d 0d |Offset;.|#endif..|
|00006280| 09 2f 2f 20 72 65 63 61 | 6c 63 75 6c 61 74 65 20 |.// reca|lculate |
|00006290| 61 6e 64 20 72 65 64 72 | 61 77 20 65 76 65 72 79 |and redr|aw every|
|000062a0| 74 68 69 6e 67 0d 09 2f | 2f 20 65 72 72 20 3d 20 |thing../|/ err = |
|000062b0| 5f 57 45 52 65 64 72 61 | 77 28 30 2c 20 4c 4f 4e |_WERedra|w(0, LON|
|000062c0| 47 5f 4d 41 58 2c 20 68 | 57 45 29 3b 0d 0d 09 2f |G_MAX, h|WE);.../|
|000062d0| 2f 20 75 6e 6c 6f 63 6b | 20 74 68 65 20 57 45 20 |/ unlock| the WE |
|000062e0| 72 65 63 6f 72 64 0d 09 | 5f 57 45 53 65 74 48 61 |record..|_WESetHa|
|000062f0| 6e 64 6c 65 4c 6f 63 6b | 28 28 48 61 6e 64 6c 65 |ndleLock|((Handle|
|00006300| 29 20 68 57 45 2c 20 73 | 61 76 65 57 45 4c 6f 63 |) hWE, s|aveWELoc|
|00006310| 6b 29 3b 0d 0d 09 72 65 | 74 75 72 6e 20 6e 6f 45 |k);...re|turn noE|
|00006320| 72 72 3b 0d 7d 0d 00 00 | 00 00 00 00 00 00 00 00 |rr;.}...|........|
|00006330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006380| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00006390| 00 00 00 02 60 00 00 02 | 7c 08 02 a6 94 21 ff c0 |....`...||....!..|
|000063a0| 90 01 00 48 a8 03 00 02 | 80 c2 00 8c 31 00 fe ff |...H....|....1...|
|000063b0| 0e 57 45 42 69 72 74 68 | 44 65 61 74 68 2e 63 20 |.WEBirth|Death.c |
|000063c0| 50 72 6f 6a 65 63 74 73 | 32 70 65 72 6f 6d 6c 6d |Projects|2peromlm|
|000063d0| 02 00 54 45 58 54 43 57 | 49 45 01 00 ff ff ff ff |..TEXTCW|IE......|
|000063e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063f0| 00 00 ab 60 e9 34 00 00 | 5b ff 00 00 01 ac 03 a6 |...`.4..|[.......|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.